home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacTech 1 to 12
/
MacTech-vol-1-12.toast
/
Reference
/
the cmsp digests ('94-'97)
/
csmp digest Vol 4 No 014
< prev
next >
Wrap
Text File
|
1996-10-27
|
137KB
|
3,915 lines
C.S.M.P. Digest Mon, 21 Oct 96 Volume 4 : Issue 14
Today's Topics:
Converting a string to OSType
Daylight saving time
Gamma fade - speed problem?
HTTP and HTML
Hilite mode with a background color
LaunchApplication() & the launchAppParameters field
Learning low-level debugging?
Mac GUI...how it works
Making OpenDoc Container Applications
ODF vs. PP-MacApp-TCL?
PowerBook examples?
Setting volume cache to write-through?
Source code for opening GIF's and JPEG's?
Symantec linker and unresolved symbols
TCP-IP apps automatically dialing PPP, etc.
THINK Reference
Think C, Symantec C
Think Pascal question
Traps.h & asm.h in Sym C-C++ 6
VIP-Basic: Opinions?
WANTED: Simple FAT DA...
WinSock.lib for macintosh
[Q] Internet Config help
text rotation
The Comp.Sys.Mac.Programmer Digest is moderated by Mark Aiken
(marka@ee.mcgill.ca).
The digest is a collection of article threads from the internet
newsgroups comp.sys.mac.programmer.help, csmp.tools, csmp.misc and
csmp.games. It is designed for people who read news semi-regularly and
want an archive of the discussions. If you don't know what a
newsgroup is, you probably don't have access to it. Ask your systems
administrator(s) for details. If you don't have access to news, you
may still be able to post messages to the group by using a mail server
like anon.penet.fi (mail help@anon.penet.fi for more information).
Each issue of the digest contains one or more sets of articles (called
threads), with each set corresponding to a 'discussion' of a particular
subject. The articles are not edited; all articles included in this digest
are in their original posted form (as received by our news server at
ee.mcgill.ca). Article threads are not added to the digest until the last
article added to the thread is at least two weeks old (this is to ensure that
the thread is dead before adding it to the digest). Article threads that
consist of only one message are generally not included in the digest.
The digests can be obtained by email, ftp or through the World Wide Web.
If you want to receive the digest by mail, send email to
majordomo@ee.mcgill.ca with no subject and one of the following commands
as body:
help Sends you a summary of commands
subscribe csmp Adds you to the mailing list
unsubscribe csmp Removes you from the list
Once you have subscribed, you will automatically receive each new
issue as it is created.
Back issues are available by ftp from Info-Mac mirror sites in the
per/csmp subdirectory, e.g.
ftp://sumex-aim.stanford.edu/info-mac/per/csmp/
The contents of all back issues can be searched by accessing the
following URL, courtesy of Andrew Barry (ajbarry@ozemail.com.au):
http://marvin.stattech.com.au/search.html
They can also be searched through the following URLs, thanks to
Tim Tuck (Tim.Tuck@sensei.com.au):
http://wais.sensei.com.au/searchform.html
wais://wais.sensei.com.au:210/csmp?
-------------------------------------------------------
From bflanner@netdreams.com (Bob)
Subject: Converting a string to OSType
Date: Thu, 03 Oct 1996 18:58:42 -0800
Organization: Net.Dreams
The OSType constants that I've used have been declared as globals:
static OSType gGeneric = {'????'};
which can be used later in the code.
What I'd like to do is convert a char[5] variable to the OSType.
TIA!
- (Bob) bflanner@sonic.net
+++++++++++++++++++++++++++
From francois-regis.degott@imag.fr (Fr. Degott)
Date: 4 Oct 1996 08:59:31 GMT
Organization: LogiMath - LMC-IMAG - Grenoble
In article <bflanner-0310961858420001@d129.pm4.sonic.net>,
bflanner@netdreams.com (Bob) wrote:
> The OSType constants that I've used have been declared as globals:
>
> static OSType gGeneric = {'????'};
>
> which can be used later in the code.
>
> What I'd like to do is convert a char[5] variable to the OSType.
> TIA!
> - (Bob) bflanner@sonic.net
Hi Bob,
int i;
char NewValue[5];
for (i=0;i<4;i++) gGeneric[i]=NewValue[i];
HTH
Fr.
_____________________________________________________________________________
Fr. Degott (Francois-Regis.Degott@imag.fr)
LogiMath, Lab. LMC-IMAG - Grenoble - France
+++++++++++++++++++++++++++
From Chelly Green <chelly@eden.com>
Date: Sun, 06 Oct 1996 15:00:01 -0500
Organization: -
Richard E. Fiegle wrote:
>
> In article <bflanner-0310961858420001@d129.pm4.sonic.net>,
> bflanner@netdreams.com (Bob) wrote:
>
> > The OSType constants that I've used have been declared as globals:
> >
> > static OSType gGeneric = {'????'};
> >
> > which can be used later in the code.
> >
> > What I'd like to do is convert a char[5] variable to the OSType.
> > TIA!
>
> Try something like this:
>
> char* my_type_string[5] = {"TEXT"};
braces are unnecessary, and this creates an array of 5 char*, not
exactly what you want either
Note: the following rant is directed at all unnecessary casts, not just
yours - don't take it personally (since I'm not making any personal
comments).
try this:
static const char my_type_string [] = "TEXT";
const correctness is good, as well making constants static (less
copying, more efficient)
> OSType type_converted_from_string = *(OSType*)my_type_string;
i.e. OSType t = *reinterpret_cast<OSType*> (my_type_string);
What is it with doing non-portable things? Besides that, this won't
necessarily even work on all Macs, let alone other systems! Is
efficiency more important than program correctness? "Hey, our program
calculates the result instantly, only it is the wrong result!" Better to
take longer than get a wrong answer.
> The key is that type cast: *(OSType*). This says: "convert the
> char* to an OSType*, and then de-reference that OSType*, so it
> becomes an OSType".
No, this says "trust me, Mr. Compiler, this char* really points to an
OSType (which it does *NOT*), I know what I'm doing (which you don't
seem to)". Type conversion and type reinterpretation are two very
different things, which is why the old-style casts are so dangerous and
confusing (they do both, depening on lots of factors).
Casts are way-overused.
> Works for me.
Doesn't work for me, and I don't even need to run the code. The "works
for me" argument means nothing. Invoking undefined behavior may work
sometimes, other times it may not. Any reliance on undefined behavior
should be very seriously questioned, and alternatives should be
considered.
Now, I'm not just going to rant about this, I'm going to show a correct
version that is portable, and will work on other machines (including
little-endian machines, like Intel).
#include <assert.h>
#include <string.h>
typedef long OSType; // a four-character code
// C version
// converts a four-character length string into an OSType
// example: make_OSType_c( "1234" ) == '1234'
// returns 0 if the string is NULL or doesn't contain 4 characters
// assumes a char has 8 bits
OSType make_OSType_c( const char* string )
{
OSType t;
if ( !string || strlen( string ) != 4 )
return 0;
t = (unsigned char) *string++;
t = (t << 8) | (unsigned char) *string++;
t = (t << 8) | (unsigned char) *string++;
t = (t << 8) | (unsigned char) *string++;
return t;
}
// C++ version (implemented on top of the C version - why duplicate
code?)
struct bad_argument { };
// same as make_OSType_c, but throws a bad_argument exception
instead
// of returning 0
OSType make_OSType( const char* string )
{
OSType t = make_OSType_c( string );
if ( !t ) throw bad_argument();
return t;
}
// test driver
int main()
{
assert( make_OSType_c( "ABCD" ) == 'ABCD' );
assert( make_OSType_c( "\x80\x81\x82\x83" ) ==
'\x80\x81\x82\x83' );
assert( make_OSType_c( "X" ) == 0 );
assert( make_OSType_c( "12345" ) == 0 );
try {
make_OSType( "123456" );
assert( 0 );
} catch ( bad_argument ) { }
catch ( ... ) { assert( 0 ); }
return 0;
}
(note: code has been compiled and tested)
--
Chelly Green | chelly@eden.com | C++ - http://www.eden.com/~chelly
+++++++++++++++++++++++++++
From Chelly Green <chelly@eden.com>
Date: Tue, 08 Oct 1996 14:39:51 -0500
Organization: -
Richard E. Fiegle wrote:
>
> In article <32580FC7.7D70@eden.com>, chelly@eden.com wrote:
>
> > Richard E. Fiegle wrote:
...
> > > Try something like this:
> > >
> > > char* my_type_string[5] = {"TEXT"};
> >
> > braces are unnecessary, and this creates an array of 5 char*, not
> > exactly what you want either
>
> Oops! You got me on the array of char*. That was a typo. Should
> have been
>
> char my_type_string[5] = {"TEXT"};
>
> I use this construct all the time. Not sure how that one got by me.
>
> Also, personally, for any array, I use brackets. This helps to remind
> me that it's an array. YMMV.
Me too, the brackets [] tell me it's an array. Why the redundant braces
{ } ?
> > [SNIP - arguments for const, reinterpret_cast]
> >
> > Casts are way-overused.
> >
> > > Works for me.
> >
> > Doesn't work for me, and I don't even need to run the code
>
> I assume you say this because of the typo (i.e., char* array instead
> of char array)? I use this (corrected version) all the time, and I'll
> repeat: It works for me, from my old Mac Plus to my new 7500/100.
Alignment requirements. A long may have a stricter alignment requirement
than a char. The char array may be unaligned, therefore casting a
pointer to this array to a pointer a long, and dereferencing this,
yields implementation-defined behavior (OK, so it's not undefined, it's
an "implementation-dependent restriction on the value of a pointer to an
object of a given type". Hmmm, if the pointer doesn't follow this
restriction, I wonder if it's undefined or implementation-defined?) The
char array *is-not-a* long!
> > The "works
> > for me" argument means nothing. Invoking undefined behavior may work
> > sometimes, other times it may not. Any reliance on undefined behavior
> > should be very seriously questioned, and alternatives should be
> > considered.
>
> Why is this undefinded behavior?
See above.
> An OSType is 4 sequential bytes (like a long). Character strings are
> sequential bytes as well. I fail to see what is undefined.
Alignment. Again, see above (I know, I know, you couldn't have already
read my reply to your reply! :-)
+++++++++++++++++++++++++++
From Chelly Green <chelly@eden.com>
Date: Tue, 08 Oct 1996 14:39:51 -0500
Organization: -
Richard E. Fiegle wrote:
>
> In article <32580FC7.7D70@eden.com>, chelly@eden.com wrote:
>
> > Richard E. Fiegle wrote:
...
> > > Try something like this:
> > >
> > > char* my_type_string[5] = {"TEXT"};
> >
> > braces are unnecessary, and this creates an array of 5 char*, not
> > exactly what you want either
>
> Oops! You got me on the array of char*. That was a typo. Should
> have been
>
> char my_type_string[5] = {"TEXT"};
>
> I use this construct all the time. Not sure how that one got by me.
>
> Also, personally, for any array, I use brackets. This helps to remind
> me that it's an array. YMMV.
Me too, the brackets [] tell me it's an array. Why the redundant braces
{ } ?
> > [SNIP - arguments for const, reinterpret_cast]
> >
> > Casts are way-overused.
> >
> > > Works for me.
> >
> > Doesn't work for me, and I don't even need to run the code
>
> I assume you say this because of the typo (i.e., char* array instead
> of char array)? I use this (corrected version) all the time, and I'll
> repeat: It works for me, from my old Mac Plus to my new 7500/100.
Alignment requirements. A long may have a stricter alignment requirement
than a char. The char array may be unaligned, therefore casting a
pointer to this array to a pointer a long, and dereferencing this,
yields implementation-defined behavior (OK, so it's not undefined, it's
an "implementation-dependent restriction on the value of a pointer to an
object of a given type". Hmmm, if the pointer doesn't follow this
restriction, I wonder if it's undefined or implementation-defined?) The
char array *is-not-a* long!
> > The "works
> > for me" argument means nothing. Invoking undefined behavior may work
> > sometimes, other times it may not. Any reliance on undefined behavior
> > should be very seriously questioned, and alternatives should be
> > considered.
>
> Why is this undefinded behavior?
See above.
> An OSType is 4 sequential bytes (like a long). Character strings are
> sequential bytes as well. I fail to see what is undefined.
Alignment. Again, see above (I know, I know, you couldn't have already
read my reply to your reply! :-)
> Are you arguing that all type casts result in undefined behavior?
Many casts invoke implementation-defined behavior, yes.
> > [SNIP - other eloquent aguments about the evils of type-casting]
> >
> > #include <assert.h>
> > #include <string.h>
> >
> > typedef long OSType; // a four-character code
> >
> > // C version
> >
> > // converts a four-character length string into an OSType
> > // example: make_OSType_c( "1234" ) == '1234'
> > // returns 0 if the string is NULL or doesn't contain 4 characters
> > // assumes a char has 8 bits
> > OSType make_OSType_c( const char* string )
> > {
> > OSType t;
> > if ( !string || strlen( string ) != 4 )
> > return 0;
> > t = (unsigned char) *string++;
> > t = (t << 8) | (unsigned char) *string++;
> > t = (t << 8) | (unsigned char) *string++;
> > t = (t << 8) | (unsigned char) *string++;
> > return t;
> > }
> >
> > [SNIP - C++ and driver code]
> >
> > (note: code has been compiled and tested)
>
> Your arguments are all valid and well-articulated. I just have a
> few counterpoints:
>
> (0) *string++ will break on 68000 machines (like my Mac Plus), which
> cannot access odd-memory addresses. When string gets to an odd
> address, you'll crash hard.
So you're saying something as simple as this will break:
int strlen( const char* str )
{
const char* p = str;
while ( *p++ ) { }
return p - str - 1;
}
Wow! That's a new one for me (I'm being sarcastic). This will not break.
It is portable code. Did you run the code on your Mac Plus? Did it
really crash?
> (1) "Don't use Type Casting" is a "rule", much like "Don't use Gotos"
> is a rule.
Nono, it's not a rule to me (I am also against the stupid "never use
goto" thing too). I use typecasts. It's just that I do see too many
typecasts, so I always try to find alternatives.
> These are great rules, but some rules should be
> broken _when it makes sense_.
Well, rules shouldn't be made if they have to be broken regularly :-)
> I forget exactly who said: "A
> foolish consistency is the hobgoblin of little minds", but to
> me, this means rules are guidelines, and no substitute for thinking.
> I might break a rule because of performance, maintainability,
> resource requirements, overhead, difficulty, or readability issues.
>
> YMMV.
I agree.
> Seems to me the perspective on "rules" is: If one is a "SW engineer",
> or in academia with little "real world" experience, he is likely
> to be a stickler for rules. If, however, one is a "programmer",
> "hacker", or a real-world problem solver (engineer?) with real time
> constraints, one tends to be a little more lenient, especially if
> following the rule means delivering a product late, or doing a
> significant amount of extra work to implement it, when a viable
> alternative is readily available.
Agreed. In a recent goto thread, someone had posted a deeply nested loop
(another thing to stay away from) with multiple tests on an exit
variable, where the goto didn't have that extra junk. The goto version
was clearer, but some still were against it simply because it involved
goto. Hehe
> Back to type casting: if you have an alias in a resource file, you
> use GetResource() to obtain a handle to it. GetResource() returns
> a Handle. Now suppose you want to resolve the alias. ResolveAlias()
> takes an AliasHandle. What's the right thing to do here?
A type cast. This involves non-static type checking, so the compiler
cannot know the type at run-time. You have to help it. However, if you
do some type checking, such as insuring a tag field in the data matches
that for an Alias, then you get run-time type checking. This can be
templatized to make it more regular, and move the casts out of the user
code to where they can be verified with the tag field.
> Somewhere here, you're going to have a type cast to an AliasHandle,
> either of the two following are candidate solutions in my book:
>
...
> Perhaps your answer will be to use reinterpret_cast<>.
That's what you used. Old-style casts are now defined in terms of the
new-style casts. In this case, '(AliasHandle) Handle' turns into
'reinterpret_cast<AliasHandle> (Handle)'.
> Perhaps this is a good answer. But, what if the programmer is
> using C, not C++? Is reinterpret_cast<> part of the C standard?
Yes (sort of), but you have no way of explicitly specifying it in the
language. An old-style cast, (T) x, will specify that in this case. Or
you could use a macro:
#ifdef __cplusplus
#define reinterpret_cast( T, v ) (reinterpret_cast<T> (v))
#else
#define reinterpret_cast( T, v ) ((T) (v))
#endif
(yes, this will work in C++, and won't conflict with reinterpret_cast<>,
because the macro is only invoked when there is an open parenthesis
after the name)
> What if the programmer is a poor student, and only has Think C
> version 5? (which I'm pretty sure does not support new casting,
> even if C itself does)
Hmmm, maybe C will support the new cast operators in the future...
> (2) Using a type cast takes one line of code. Your solution, although
> very robust to errors, very portable and apparently very well tested,
Not really tested much, I wrote it just for the reply.
> takes 8 lines of code (I didn't count your main() driver, or your C++
> version). IMHO, it's more difficult to read, too, especially the
> lines that contain the following:
Users using the function or the implementation? I think the comment
specified what the function did. If you want to verify the
implementation, then run the test program. If you really want to verify
it, then you'll have to read the sourclems along the way.
> Of course, there are drawbacks to this:
> Ever notice how many bugs there are in "new" software? Well,
> The Correct Solution and the Timing Requirements are at odds with
> each other, so we make compromises. We're doing the best we can
> with what we've got.
But you need to always be learning *better* ways of doing things, using
your tools more effectively, taking risks, experimenting with ideas.
> [This is not to say there is no room for
> improvement -- but look at No Silver Bullet where Fred Brooks says
> that we've already made 85% of all optimizations in software
> development. There will be no "order-of-magnitude" improvements].
Sure, as a *whole*, there may be no more major optimizations (yeah,
right), but what *individual* has learned all the things the whole has
learned? Each individual knows a small portion of these techniques.
Never stop learning!
> --
> Richard E. Fiegle
> Opinions expressed are mine, not necessarily those of my employer
Oh great, I'm now participating in one of this big discussion threads...
:-)
--
Chelly Green | chelly@eden.com | C++ - http://www.eden.com/~chelly
e code.
(Also, I should have used CHAR_BIT from <limits.h>, so it wouldn't even
assume 8-bit chars)
> (t << 8) | (unsigned char) *string++;
>
> It also uses more stack space, has more overhead, blah, blah, blah.
> I'm sure you knew that :-)
Hell yeah, but I'd rather have a robust program than one that crashes on
machines that can't handle unaligned long-word accesses (such as the
68000). I admit, I usually only put lots of error checking and
assertions in error-prone areas, such as memory copy, and memory
management.
Who says it couldn't have had a more efficient implementation?
OSType func( const char* str )
{
// checking
#if unaligned_access_ok && big_endian_cpu
// or even if ( big_endian_cpu && (unaligned_access_ok ||
is_ptr_aligned( str )) )
return *reinterpret_cast<const OSType*> (str);
#else
// ...
#endif
}
> I can see what it does, but to a novice (for readability), the
> type-cast gets the point across very clearly (yeah, I know, it
> also starts what may turn out to be a "bad habit").
But the type-cast doesn't work on all Macs, and won't work right on
Intel machines (which use little-endian byte ordering). Why should a
novice know about memory layout without knowing about the dangers (and
the fact that different processors may be significantly different)?
> (3) It's been my experience that many (not all -- sorry for the
> stereotype) programmers are under time constraints, and are
> many times more interested in a quick-and-easy solution that
> *works*, not in The "Correct Solution"
Yes, I get that impression too. But in this case, your code would have
failed on a machine that didn't allow unaligned accesses, as well as
non-big-endian machines. I bet you could even try it on your Mac Plus
and get it to crash.
...
> Back in the real-world though, it has become obvious that time
> (delivery of product time, that is) is of the essence. In all
> practicality, the quicker you get a solution, the better your
> company is financially.
The quicker you get the *stable* solution, the more flexible it is, how
well it helps catch errors. I think spending time before coding is
better than just coding and fixing problems along the way.
> Of course, there are drawbacks to this:
> Ever notice how many bugs there are in "new" software? Well,
> The Correct Solution and the Timing Requirements are at odds with
> each other, so we make compromises. We're doing the best we can
> with what we've got.
But you need to always be learning *better* ways of doing things, using
your tools more effectively, taking risks, experimenting with ideas.
> [This is not to say there is no room for
> improvement -- but look at No Silver Bullet where Fred Brooks says
> that we've already made 85% of all optimizations in software
> development. There will be no "order-of-magnitude" improvements].
Sure, as a *whole*, there may be no more major optimizations (yeah,
right), but what *individual* has learned all the things the whole has
learned? Each individual knows a small portion of these techniques.
Never stop learning!
> --
> Richard E. Fiegle
> Opinions expressed are mine, not necessarily those of my employer
Oh great, I'm now participating in one of this big discussion threads...
:-)
--
Chelly Green | chelly@eden.com | C++ - http://www.eden.com/~chelly
+++++++++++++++++++++++++++
From Chelly Green <chelly@eden.com>
Date: Tue, 08 Oct 1996 14:56:10 -0500
Organization: -
John Stiles wrote:
>
> > Your arguments are all valid and well-articulated. I just have a
> > few counterpoints:
> >
> > (0) *string++ will break on 68000 machines (like my Mac Plus), which
> > cannot access odd-memory addresses. When string gets to an odd
> > address, you'll crash hard.
>
> Not true in this case. He's getting a char, which is only one byte.
Or you'd expect it to be a byte, and sizeof (char) is defined to be 1.
So I guess it's a byte (OK, so I know it is, but I wanna be a
language-freak right now :-)
> 68000's can access odd-memory bytes, but not words or longs. I've had a
> lot of experience on this one (I wrote a BinHexer in assembly a few years
> ago).
I don't need to know this (even though I do), because we're talking
about the C language, not assembly language or logic hardware.
> The rest of your post, though, was incredibly well articulated. Bravo! I
> honestly can't believe someone would go so far as to implement a complex
> C++ program to convert a 4-character string to a longword.
OK, so maybe I went a little too far (but it works, does it matter?). I
wanted to make a point, damn it! :-)
> Portability
> reasons...?!?! When was OSType a valid type in Windows?
typedef long OSType;
Valid now? Using character codes is common on many systems.
> UNIX? C'mon guys, this is an EASY problem...
An easy one to screw up, I see (yes, you are about to post an incorrect
solution, not due to any typos)
> {
> OSType myOSType;
> char myStringType[5] = "TEXT";
>
> myOSType = *(long*)myStringType;
> }
>
> This might fail on a 68000 series,
This will fail, no question (but not necessarily every time it's
called). Of course, the myStringType wouldn't be locally initialized,
otherwise why even use any casting? i.e. 'TEXT' ding!
> FWIW, because this WOULD screw up the
> 68000's alignment on odd addresses (we're using a long this time, not
> bytes). If you really want to support 68000 machines,
Or any other machine that can't handle unaligned accesses (I hear many
RISC machines are like that).
> you could use the safe method:
>
> {
> OSType myOSType;
> char myStringType[5] = "TEXT";
>
> myOSType = (myStringType[0] << 24) | (myStringType[1] << 16) |
> (myStringType[2] << 8) | (myStringType[3] );
> }
>
> None of this code was tested.
Because if it were, it would be found not to work (for two reasons)!
Yes, that's right. Try it on a compiler that uses 16-bit ints (like the
Mac 68K compilers can do).
Reason 1:
myStringType[0] << 24
Compiler promotes char to int, which could be as small as 16 bits. Shift
left 24 bits, and you always have zero!
Reason 2:
myStringType[3]
char may be signed or unsigned. On Mac compilers, it is often signed. If
one of the chars of the type had were negative (i.e. its value was >
127, sign bit set, say a special extended character), then conversion to
int (sign-extension) would cause it to mess with other characters.
> But it's so basic! If there's a bug, it's probably a typo rather than a logic error.
I don't think either of those were typos. They were a result of not
examining the code carefully, not understanding the standard well
enough, or both. Nice try, though. That probably would have been a
better way to write the routine I posted (instead of using
post-incrementing on the pointer).
> Oh, and for the record, the routine directly above is 100% portable, with
> no endian reliance. But who the heck cares?!? ;) ;)
I sure don't, since it is broken anyway. Hey, I can write a 100%
portable routine (like yours) with even less code!
OSType type_from_string( const char* ) { return -1; }
Works just about as well :-)
>
> *Stiles
--
Chelly Green | chelly@eden.com | C++ - http://www.eden.com/~chelly
---------------------------
From t.grimwood@auckland.ac.nz (Tony Grimwood)
Subject: Daylight saving time
Date: Tue, 08 Oct 1996 10:33:32 +1300
Organization: School of Music, University of Auckland
Can anyone tell me if where the OS stores it's daylight saving time flag
and how to access it?
thanks
tg
--
PGP fingerprint: 8D 40 36 1C 60 51 DE 2F DA E0 A1 10 86 0D 0A E5
Make no friendship with an elephant keeper
unless you have room to entertain an elephant.
- Saadi of Shiraz -
+++++++++++++++++++++++++++
From blob@ricochet.net
Date: Mon, 07 Oct 1996 20:44:09 -0700
Organization: (none)
In article <t.grimwood-0810961033320001@news.auckland.ac.nz>,
t.grimwood@auckland.ac.nz (Tony Grimwood) wrote:
> Can anyone tell me if where the OS stores it's daylight saving time flag
> and how to access it?
This is documented in technote 1064, with the too-long title of "Inside
Macintosh: Operating System Utilities:Addendum to Chapter 4 -- Determining
If Daylight Savings Time is in Effect". This is available at the URL
<http://devworld.apple.com/dev/technotes/tn/tn1064.html>
--
(Pointers to other Mac programming web sites at
<http://devworld.apple.com/dev/geeks.html>)
+++++++++++++++++++++++++++
From Lev_Knopov@mail.stil.scitex.com (Lev Knopov)
Date: Tue, 08 Oct 1996 08:51:50 +0200
Organization: Scitex Corporation Ltd.
In article <t.grimwood-0810961033320001@news.auckland.ac.nz>,
t.grimwood@auckland.ac.nz (Tony Grimwood) wrote:
> Can anyone tell me if where the OS stores it's daylight saving time flag
> and how to access it?
> thanks
>
> tg
>
Check pascal void ReadLocation(MachineLocation *loc) (OSUtils.h)
For more info go to
page 4-20 of Inside Macintosh: Operating System Utilities
HTH
--
//\\ Lev Knopov
\\// Scitex Israel
/// \\\ Lev_Knopov@mail.stil.scitex.com
---------------------------
From Ulla S=?iso-8859-1?Q?=F6derberg Lundgren <ulla_s_l@tf.macexchange.se>?=
Subject: Gamma fade - speed problem?
Date: Thu, 03 Oct 1996 16:32:36 +0000
Organization: NAVOCEANO
The game I'm wrigting right now, is supposed to start with a gamma
fade when you open it. I found a nice library that takes care of it
for me. There's just one problem; It slows all the CopyBits calls from
my QWorld to the screen down increadibly! I'm pretty sure it has to do
with the palette. It seems like CopyBits is translating the colors for
me even though they are the same. Is there a simple way of fixing
this?
/Patrik
+++++++++++++++++++++++++++
From zaphod@dna.ca (Zaphod)
Date: Sun, 6 Oct 1996 10:36:57 -0400
Organization: dna.ca
ulla s l@tf.macexchange.se,Internet writes:
>The game I'm wrigting right now, is supposed to start with a gamma
>fade when you open it. I found a nice library that takes care of it
>for me. There's just one problem; It slows all the CopyBits calls from
>my QWorld to the screen down increadibly! I'm pretty sure it has to do
>with the palette. It seems like CopyBits is translating the colors for
>me even though they are the same. Is there a simple way of fixing
>this?
It sounds like you are copying between two GWorlds that are each
attached to a different device.
When you make your gamma fade, the colours on one device change but not
the other. Copybits is likely trying to compensate for the colour
difference which is probably where your slowdown is occuring.
There are two ways I would fix this :
1) Make both GWorlds share the same graphics device.
2) Excute the gamma fade on both devices.
I'm not sure how effective the second one would be. QuickDraw may
still do the same thing. Making both GWorlds share the same device is
probably your best bet.
- ---------------------------------------------------------------
- Brian Cantin, a.k.a. Zaphod (zaphod@dna.ca) -
- Co-owner of Euphoria Cyberware (cp820@freenet.carleton.ca) -
- Computer Programming : The leading cause of caffine addiction -
- ---------------------------------------------------------------
---------------------------
From hpe@algonet.se
Subject: HTTP and HTML
Date: Tue, 08 Oct 1996 13:42:50 +0100
Organization: AlgoNet Public Access Node, Stockholm
We are going to implement in our MacApp-application a communication between
our application and WEB-servers on the Internet. It should be possible to fetch
and display HTML-files. It's not going to be a browser. We would only like
to fetch
and display pages as a complement to a local database.
Can someone help me with any of these questions:
1. Can I find a third part library that implements TCP/IP and HTTP?
2 Can I find some source code examples about this?
3. What API should I use? Open Transport?
4. Can I find a third part library or source code example that implements
a simple HTML-viewer?
5. Can I find any useful information on the Developer CD Series?
Answer to this newsgroup or e-mail to petere@optosof.se
Peter Eriksson
+++++++++++++++++++++++++++
From hpe@algonet.se (Peter Eriksson)
Date: Wed, 09 Oct 1996 07:31:01 +0100
Organization: AlgoNet Public Access Node, Stockholm
> Use PowerPlant's Internet Classes. Even though your project is written
> with MacApp, you can still use these classes (we use parts of PowerPlant
> in one of our MacApp-based applications). They only require the PowerPlant
> Networking and Thread classes so you won't need the rest of PowerPlant.
Thank you,
I should test this today.
/Peter
+++++++++++++++++++++++++++
From hpe@algonet.se (Peter Eriksson)
Date: Wed, 09 Oct 1996 07:31:36 +0100
Organization: AlgoNet Public Access Node, Stockholm
> Use PowerPlant's Internet Classes. Even though your project is written
> with MacApp, you can still use these classes (we use parts of PowerPlant
> in one of our MacApp-based applications). They only require the PowerPlant
> Networking and Thread classes so you won't need the rest of PowerPlant.
Thank you,
I should test this today.
/Peter
+++++++++++++++++++++++++++
From tulip@tiac.net (Ed Anson)
Date: Tue, 08 Oct 1996 21:26:13 -0400
Organization: Tulip Software
The answer to all those questions is Cyberdog. Check it out.
In article <hpe-0810961342090001@10.0.2.15>, hpe@algonet.se wrote:
> We are going to implement in our MacApp-application a communication between
> our application and WEB-servers on the Internet. It should be possible
to fetch
> and display HTML-files. It's not going to be a browser. We would only like
> to fetch
> and display pages as a complement to a local database.
>
> Can someone help me with any of these questions:
>
> 1. Can I find a third part library that implements TCP/IP and HTTP?
> 2 Can I find some source code examples about this?
> 3. What API should I use? Open Transport?
> 4. Can I find a third part library or source code example that implements
> a simple HTML-viewer?
> 5. Can I find any useful information on the Developer CD Series?
>
> Answer to this newsgroup or e-mail to petere@optosof.se
>
>
> Peter Eriksson
- --------------------
Ed Anson
Tulip Software
Andover, MA 01810
U.S.A. <http://www.tiac.net/users/tulip/home.html>
+++++++++++++++++++++++++++
From mxmora@mxmdesigns.com (Matthew Xavier Mora)
Date: Tue, 08 Oct 1996 23:12:24 -0700
Organization: MXM DesignsÅ
In article <hpe-0810961348530001@10.0.2.15>, hpe@algonet.se wrote:
> We are going to implement in our MacApp-application a communication between
> our application and WEB-servers on the Internet. It should be possible
to fetch
> and display HTML-files. It's not going to be a browser. We would only like
> to fetch
> and display pages as a complement to a local database.
>
> Can someone help me with any of these questions:
>
> 1. Can I find a third part library that implements TCP/IP and HTTP?
> 2 Can I find some source code examples about this?
> 3. What API should I use? Open Transport?
> 4. Can I find a third part library or source code example that implements
> a simple HTML-viewer?
> 5. Can I find any useful information on the Developer CD Series?
>
> Answer to this newsgroup or e-mail to petere@optosof.se
I have sample code based on Peter Lewis's earlier TCP library
code (ie pre Open Transport). It in Pascal.
Send me a reminder email and I'll send it to you if you want.
Xavier
--
Matthew Xavier Mora <mailto:mxmora@mxmdesigns.com>
<http://www.best.com/~mxmora/mxm.html>
+++++++++++++++++++++++++++
From SouthSide@kagi.com (Bob Bradley)
Date: Tue, 08 Oct 1996 18:36:55 -0800
Organization: SPC
In article <hpe-0810961342090001@10.0.2.15>, hpe@algonet.se wrote:
> 1. Can I find a third part library that implements TCP/IP and HTTP?
Use PowerPlant's Internet Classes. Even though your project is written
with MacApp, you can still use these classes (we use parts of PowerPlant
in one of our MacApp-based applications). They only require the PowerPlant
Networking and Thread classes so you won't need the rest of PowerPlant.
> 2 Can I find some source code examples about this?
On the CodeWarrior CD, there's an Internet Example that implements HTTP as
well as SMTP, POP3, and FTP. It won't take you more than 30 minutes to get
it working.
> 3. What API should I use? Open Transport?
This is completely handled for you and it works with Open Transport and MacTCP.
---------------------------
From smfr@santafe.edu (Simon Fraser)
Subject: Hilite mode with a background color
Date: Mon, 07 Oct 1996 19:26:07 -0700
Organization: Santa Fe Institute
What is the best way to hilite text, when it's drawn over a background
color that is not white?
If I do the standard thing of LMSetHiliteMode, then InvertRect, stuff
with a white background is hilited fine, but the hilite color does
not show up over a non-white background. Yet some apps (e.g. CW IDE 10)
do this fine.
Any help much appreciated,
Simon
--
________________________________________________________________
Simon Fraser Santa Fe Institute
smfr@santafe.edu 1399 Hyde Park Road
http://www.santafe.edu/~smfr/ Santa Fe, NM 87501
+++++++++++++++++++++++++++
From christian.bau@isltd.insignia.com (Christian Bau)
Date: Tue, 8 Oct 1996 14:48:46 GMT
Organization: Insignia Solutions
Hiliting exchanges the background color and the hilite color. So if you
have text drawn on light grey, for example, you must set the background
color to the light grey.
In article <smfr-0710961926070001@simon.santafe.edu>, smfr@santafe.edu
(Simon Fraser) wrote:
> What is the best way to hilite text, when it's drawn over a background
> color that is not white?
>
> If I do the standard thing of LMSetHiliteMode, then InvertRect, stuff
> with a white background is hilited fine, but the hilite color does
> not show up over a non-white background. Yet some apps (e.g. CW IDE 10)
> do this fine.
>
> Any help much appreciated,
>
> Simon
>
> --
> ________________________________________________________________
> Simon Fraser Santa Fe Institute
> smfr@santafe.edu 1399 Hyde Park Road
> http://www.santafe.edu/~smfr/ Santa Fe, NM 87501
+++++++++++++++++++++++++++
From parichan@best.com (Kevin Parichan)
Date: Tue, 08 Oct 1996 11:00:44 -0800
Organization: Best Internet Communications
In article <smfr-0710961926070001@simon.santafe.edu>, smfr@santafe.edu
(Simon Fraser) wrote:
>What is the best way to hilite text, when it's drawn over a background
>color that is not white?
>
>If I do the standard thing of LMSetHiliteMode, then InvertRect, stuff
>with a white background is hilited fine, but the hilite color does
>not show up over a non-white background. Yet some apps (e.g. CW IDE 10)
>do this fine.
Try temporarily setting the background color using RGBBackColor() to that
non-white color before calling LMSetHiliteMode and InvertRect. This should
work as long as the rectangle you're inverting covers only that single
color.
-Kevin Parichan
---------------------------
From "John Haggerty" <johnh@imtcorp.com>
Subject: LaunchApplication() & the launchAppParameters field
Date: 3 Oct 1996 23:07:16 GMT
Organization: IMT
What is the appropriate contents of the launchAppParameters field if I want
to launch an app and have it immediately open a document. After reading the
LaunchApplication() and Apple Event documentation, it is still not clear to
me exactly what data the various fields of the record want.
Thanks,
John Haggerty
johnh@imtcorp.com
+++++++++++++++++++++++++++
From blob@ricochet.net
Date: Fri, 04 Oct 1996 19:10:20 -0700
Organization: (none)
In article <01bbb17e$dc525700$14646496@INX-10293.jhaggerty.xo.com>, "John
Haggerty" <johnh@imtcorp.com> wrote:
> What is the appropriate contents of the launchAppParameters field if I want
> to launch an app and have it immediately open a document.
See technote 1002 at
<http://devworld.apple.com/dev/technotes/tn/tn1002.html> for sample code
and a long discussion of how to do this correctly.
--
(Pointers to other Mac programming web sites at
<http://devworld.apple.com/dev/geeks.html>)
+++++++++++++++++++++++++++
From jordanz@altura.com (Jordan Zimmerman)
Date: Mon, 07 Oct 1996 09:28:39 -0800
Organization: Altura Software, Inc.
In article <01bbb17e$dc525700$14646496@INX-10293.jhaggerty.xo.com>, "John
Haggerty" <johnh@imtcorp.com> wrote:
> What is the appropriate contents of the launchAppParameters field if I want
> to launch an app and have it immediately open a document. After reading the
> LaunchApplication() and Apple Event documentation, it is still not clear to
> me exactly what data the various fields of the record want.
>
> Thanks,
>
> John Haggerty
> johnh@imtcorp.com
You have to set up an initial Apple Event to get the document to open. I
believe the Developer CDs have sample code for this.
--
Jordan Zimmerman
Altura Software, Inc.
home page: http://www.altura.com/jordanz
Harry Browne for President!
http://www.harrybrowne96.org 1 (800) 682 1776
Stop the Browne Out! Let Harry Browne debate! http://www.twr.com/STBO
---------------------------
From uzs90z@uni-bonn.de (Michael Schuerig)
Subject: Learning low-level debugging?
Date: Sun, 6 Oct 1996 15:52:26 +0200
Organization: RHRZ - University of Bonn (Germany)
I admit it, I've eschewed MacsBug as much as I could although I have
_MacsBug Ref and Debugging Guide_ lying around for several years. But I
guess I've got to learn it eventually. Are there any tutorials out there
or is learning-by-doing the only way?
Michael
- -
Michael Schuerig
mailto:uzs90z@uni-bonn.de
http://www.rhrz.uni-bonn.de/~uzs90z/
+++++++++++++++++++++++++++
From squires@crl.com (Scott Squires)
Date: Sun, 06 Oct 1996 13:14:12 -0800
Organization: Puffin Designs
In article <19961006155226814105@rhrz-ts2-p1.rhrz.uni-bonn.de>,
uzs90z@uni-bonn.de (Michael Schuerig) wrote:
>I admit it, I've eschewed MacsBug as much as I could although I have
>_MacsBug Ref and Debugging Guide_ lying around for several years. But I
>guess I've got to learn it eventually. Are there any tutorials out there
>or is learning-by-doing the only way?
>
If this if for 68k code then you might want to check out
How to Write Macintosh Software by Scott Knaster (Addison Wesley)
It steps through the entire debugging process (what compiled code looks
like, things to try, tricks, tips, etc)
I don't think it's been updated for the PowerPC though.
Yopu might also check the Apple Web site for Develop magazine.
There have been a few articles/columns about the debugging process.
(There's even a puzzle in most of them involving solving an obscure
bug)
-scott
Scott Squires "Insert funny stuff here"
squires@crl.com
ScottSquir@aol.com
+++++++++++++++++++++++++++
From tinman@itouch.net (Dave Newman)
Date: Sun, 06 Oct 1996 15:28:35 -0500
Organization: Real/Time Communications Internet customer posting
In article <19961006155226814105@rhrz-ts2-p1.rhrz.uni-bonn.de>,
uzs90z@uni-bonn.de (Michael Schuerig) wrote:
> I admit it, I've eschewed MacsBug as much as I could although I have
> _MacsBug Ref and Debugging Guide_ lying around for several years. But I
> guess I've got to learn it eventually. Are there any tutorials out there
> or is learning-by-doing the only way?
Michael,
"How to Write Macintosh Software" by Scott Knaster, gives a good set of
tutorials on debugging 68K code using low level debuggers. The last edition
I've seen was the 3rd edition and it did not cover PowerPC code. However,
many concepts for 68K debugging on the Mac cross over to PowerPC debugging
as well.
--Dave
--
Dave Newman
tinman@itouch.net
+++++++++++++++++++++++++++
From blob@ricochet.net
Date: Sun, 06 Oct 1996 15:00:30 -0700
Organization: (none)
In article <19961006155226814105@rhrz-ts2-p1.rhrz.uni-bonn.de>,
uzs90z@uni-bonn.de (Michael Schuerig) wrote:
> I admit it, I've eschewed MacsBug as much as I could although I have
> _MacsBug Ref and Debugging Guide_ lying around for several years. But I
> guess I've got to learn it eventually. Are there any tutorials out there
> or is learning-by-doing the only way?
There is an outstanding Developer University class offered quarterly by
Apple. See their web site at <http://devworld.apple.com/dev/du.shtml>.
Unfortunately, it's only offered in a classroom setting, and I can't find
any information on that site concerning European classes.
The best "tutorials" I've seen for Macsbug come from the various cracker
sites where they are listed as an introduction to Macintosh hacking. An
AltaVista search for "macintosh crack" will find something.
--
(Pointers to other Mac programming web sites at
<http://devworld.apple.com/dev/geeks.html>)
+++++++++++++++++++++++++++
From shane@wonk.demon.co.uk (Shane Badham)
Date: Tue, 8 Oct 1996 19:52:22 +0000
Organization: "At home!"
Michael Schuerig <uzs90z@uni-bonn.de> wrote:
> I admit it, I've eschewed MacsBug as much as I could although I have
> _MacsBug Ref and Debugging Guide_ lying around for several years. But I
> guess I've got to learn it eventually. Are there any tutorials out there
> or is learning-by-doing the only way?
>
> Michael
>
> ---
> Michael Schuerig
> mailto:uzs90z@uni-bonn.de
> http://www.rhrz.uni-bonn.de/~uzs90z/
Michael,
I bought "Debugging Macintosh Software with MacsBug" last year. Its by
Konstantin Othmer (ex project leader for System 7 QuickDraw) and Jim
Straus also an ex Mac programmer from Apple. They seen to know their
stuff OK.
Book comes with a disk, but its version 6.2, a bit old. However, much
of the tutorial stuff still holds good. I have not finished all the
tutorial as yet (had to do other things, ;-), but I have learned much
already.
Did you know that MacsBug has templates for most of the System data
structures and using these you can see what they contain?
Jacket price is $34.95 (can't find the UK price). Publishers are
Addison Wesley, ISBN 0-201-57049-1. In the UK it's available from
Barnicotes of Falmouth, among others.
--
Regards, Shane.
"A closed mouth gathers no feet!"
---------------------------
From Domenico_Celli@mindlink.bc.ca
Subject: Mac GUI...how it works
Date: Tue, 8 Oct 1996 00:29:01 GMT
Organization: MIND LINK! - British Columbia, Canada
I am a C/C++ programmer who mainly works with UNIX, DOS and MS WIN32
operatings systems (unfourtunately all my work has been on PCs).
After learning the Windows API and structure, I am interested in how the Mac
manages processes, windows, redraws, etc
If there is drastic difference in many of the MacOSs, System 7 or 8 would be
nice
thanx for any help
+++++++++++++++++++++++++++
From connorbd@cleo.bc.edu (Brian Connors)
Date: 8 Oct 1996 13:58:01 GMT
Organization: db&b
In article <Domenico_Celli.217.3259A04D@mindlink.bc.ca>,
Domenico_Celli@mindlink.bc.ca wrote:
> I am a C/C++ programmer who mainly works with UNIX, DOS and MS WIN32
> operatings systems (unfourtunately all my work has been on PCs).
> After learning the Windows API and structure, I am interested in how the Mac
> manages processes, windows, redraws, etc
> If there is drastic difference in many of the MacOSs, System 7 or 8 would be
> nice
It's quite a bit different. I should say right off that I'm not a Windows
expert by any means, but I have read Petzold, so here's the best I can
tell you.
Windows: The Mac way doesn't revolve anywhere near as much around windows
as Windows does. In Win32, everything is based around talking to the
window; unless you're working with MDI windows, each instance of the
application has to handle all messages itself somehow. The upside of this,
however, is the DefaultWindowProc, which lets you ignore any behavior you
don't need to deal with. On the Mac, only one instance of an application
can be active at any given time, which means that a lot of things (event
handling and subsystem initialization are two things that come to mind)
are taken care of only once for every main window, then handled as the
programmer sees fit. IMHO this is probably more economical than one
window->one app, though the downside here is that nothing can be ignored.
Even if you're not interested in what happens to an event, you still have
to let the system know that you don't want the event you've been given. In
some ways it's theoretically more powerful than the Windows method, but in
practice the huge number of messages your app might recieve would appear
to make up the flexibility you'd think you'd lost.
Events: Both MacOS and Windows are event-driven in a basic sense of the
word, but there are serious differences in the way events are treated. The
MacOS has a relatively small number of event types, such as mouseup,
mousedown, keydown, update, and high-level. This is where the previous
point about not being able to ignore anything comes in; the Mac event loop
(the heart, incidentally, of the Mac's cooperative multitasking) always
returns to the WaitNextEvent call to recieve an event, then must decide
what to do with it. It first parses the event based on type, calling an
appropriate handler from in or around the event loop. The handler then
does the appropriate action based on the content of the rest of the event.
Mouse events are handled in what IMHO is a somewhat ad hoc manner that
Windows programmers don't seem to have to worry about: the coordinates of
the click are returned, and the app makes a toolbox call or two to figure
out where it happened. Key events are passed on to the app, and other
events (explained below) are dealt with appropriately. Any events that are
not appropriate for the app that recieved them are kicked back to the
system to send elsewhere (a holdover from pre-MultiFinder days). There are
a few special events that underlie the whole function of the interface:
-Update events: This is the one event that should never be ignored.
When you recieve one, your app must drop everything and redraw or the
computer may hang.
-High-Level Events: These events are relatively low-priority events
that underlie the AppleEvent Interprocess Messaging Protocol. AppleEvents
are the backbone of the modern Mac app; a core set of four is essentially
required for Mac programming, and AppleScript (MacOS's native scripting
language) is based entirely around AppleEvents. The downside is that the
architecture tends to be on the slow side; effective workarounds have been
developed.
Other events tell an app that it's time to give up time or that it's time
to mount (or format) a disk.
Resources: Resources are far more pervasive on the Mac than on Windows.
Until the rise of the PowerPC (applications for which have the code in the
data fork, a section of the file used for storing contiguous data)
everything was built from a resource; most of the interface still is. In
addition, due to the existence of the resource fork, resources are easily
found and altered; ResEdit hacks are a favorite pastime of many Mac power
users.
Multitasking: I'm sure you're familiar with cooperative multitasking.
<soapbox>Which is true multitasking as far as I'm concerned. Your computer
is keeping track of several tasks at once, you're multitasking. It has
nothing to do with who's making the scheduling decisions. </soapbox>
Virtually all multitasking done on the Mac is of a cooperative nature,
with the exception of tasks tied to the Vertical Blanking Interrupt, which
is a way of preemptively multitasking certain tasks that don't affect
system-wide resources. (The name is a throwback to the days when all Macs
had 60hz monochrome screens.) In some ways Windows is more robust, though
only NT can claim full preemptive multitasking for everything. (And of
course Unix knows no other way, but that's another story.)
Memory Management: This is something of a sore spot with Mac users. The
early Macs lacked the hardware to implement a useful memory management
scheme, and the current implementation is an updated version of an ancient
hack designed to fit a full graphical OS into a 64K system (the size of
the prototype Macs of around 1983). Therefore, a lot of things have been
reverse-engineered and written around to the point where many apps (not to
name any names but the best known come from Washington state ;-) ) break
from one system release to the next. This happens to be a common problem
on the Mac; the System 7 and 7.5 transitions were known to be particularly
traumatic because things were removed or changed that programs depended
on. In general, MacOS has no native protected memory and no transparent
way to backpatch it in.
Incidentally, Macs use both pointers and handles; a Mac handle is a
pointer to a pointer and unlike a Win32 handle can be double-dereffed just
like any other pointer to a pointer.
System-level Services: This one could be batted back and forth endlessly.
As of System 7.5.3, the MacOS does have its own object model (SOM, which
is considered to be more robust than Windows' COM) and component
architecture (OpenDoc, a superset of OLE and yet much less complex to
program). MacOS has provided built-in scripting since 7.1.1 in the form of
AppleScript, though it's not yet PowerPC native. The MacOS also provides
shared library support (in what amounts to three different forms; Apple
has issued a Statement of Direction in favor of SOM with the Code Fragment
Manager and no longer encourages use of ASLM) and pretty well-constructed
networking support (OpenTransport, introduced with 7.5.2 and functional by
7.5.3). The MacOS help systems are completely without equal; to the best
of my knowledge, AppleGuide (which shows you as well as tells you) is the
single best architecture for online help available.
However, the age of the Mac once again shows; the non-threaded file system
has required some interesting hacks for applications such as news servers,
and makes the MacOS unsuitable for seriously stressful server
applications. (In other words, a small-to-medium corporate web site is no
big deal, but I believe most of Apple's big web servers are Unix-based...)
Media: The Mac has a number of useful things available. The graphics
architectures of the Mac are pioneering; QuickDraw, for example, was the
first mass-market systemwide graphics architecture available (it
originated on the Lisa and greatly improved on what Xerox had cooked up).
Quickdraw GX, despite its problems (it's a memory hog and does so much
that programmers don't know where to start), still offers a vast
improvement on all aspects of the Mac graphics and typography interface,
while QuickDraw 3D is very quickly becoming a major force in the 3D
graphics world (at least on the Mac). Quicktime adds digital video and
part of the General MIDI spec.
On the whole, the MacOS is a very different beast indeed from Windows.
Though mapping the basic concepts is not especially difficult, you'll find
that a lot of stuff you did in Windows may be done in a very different
(even opposite) way on the Mac, and I think (excuse a bit of chauvinism
here and elsewhere) you'll find a lot of what you have in Windows turns
out to be only the tip of the iceberg on certain parts of the Mac.
One point to make note of: the interfaces for many of the Mac's toolbox
managers aren't very consistent with others, the Printing and Resource
managers probably being the worst offenders. It's just something you have
to get used to.
/Coach
+++++++++++++++++++++++++++
From Joseph Strout <jstrout@ucsd.edu>
Date: Tue, 8 Oct 1996 10:38:02 -0700
Organization: University of California, San Diego
On Tue, 8 Oct 1996 Domenico_Celli@mindlink.bc.ca wrote:
> After learning the Windows API and structure, I am interested in how the Mac
> manages processes, windows, redraws, etc
> If there is drastic difference in many of the MacOSs, System 7 or 8 would be
> nice
There are no drastic differences in the MacOS versions; newer versions
just have added features.
A key difference, I think, is the use of resources: Mac applications store
menus, window definitions, commonly used strings, dialog boxes, etc. in
the resource fork of the application. These are most easily viewed and
edited with ResEdit (get from http://wwwhost.ots.utexas.edu/mac/main.html).
Another key difference, of course, is that the MacOS comes with an
extensive toolbox of built-in functions. Most of your average Mac
application is handled by the system itself.
I recommend you start with a simple framework like MacZoop. It's clean,
efficient, and small enough for you to see what's going on. It's
available at:
http://www.warwick.ac.uk/~corbe/MacZoop/MacZoop.html
See also the Macintosh programming pages:
http://devworld.apple.com/dev/geeks.html
...and Inside Macintosh -- official Toolbox documentation:
http://devworld.apple.com/dev/insidemac.shtml
Have fun!
-- Joe
,------------------------------------------------------------------.
| Joseph J. Strout Department of Neuroscience, UCSD |
| jstrout@ucsd.edu http://www-acs.ucsd.edu/~jstrout/ |
`------------------------------------------------------------------'
---------------------------
From "Loren Peace" <peace@coe.missouri.edu>
Subject: Making OpenDoc Container Applications
Date: 6 Oct 96 03:33:05 -0500
Organization: University of Missouri - Columbia
Does anyone know of any good sources for ducuments about and/or tools for
how to create OpenDoc container applications.
Any help would be greatly appreciated.
Loren Peace peace@coe.missouri.edu
=======================================================================
Once the avalanche has started, it is too late for the pebbles to vote.
Kosh Naranek (Babylon 5)
=======================================================================
Loren's WWW Pages: Dr. Who, Blakes7 - pics, sounds, stories, misc. docs
URL: http://www.coe.missouri.edu/~peace
=======================================================================
+++++++++++++++++++++++++++
From doverton@iglou.com (Dave Overton)
Date: 7 Oct 1996 17:38:40 GMT
Organization: NETCOM Network Operations
Loren,
The whole OpenDoc development suite is on http://www.opendoc.apple.com/
You also need a development system, they currently support MPW,
Metrowerks, and Symantek.
Dave Overton
In article <AE7CD8F4-231425@128.206.76.57>, "Loren Peace"
<peace@coe.missouri.edu> wrote:
> Does anyone know of any good sources for ducuments about and/or tools for
> how to create OpenDoc container applications.
>
> Any help would be greatly appreciated.
>
> Loren Peace peace@coe.missouri.edu
> =======================================================================
> Once the avalanche has started, it is too late for the pebbles to vote.
> Kosh Naranek (Babylon 5)
> =======================================================================
> Loren's WWW Pages: Dr. Who, Blakes7 - pics, sounds, stories, misc. docs
> URL: http://www.coe.missouri.edu/~peace
> =======================================================================
+++++++++++++++++++++++++++
From Jim.Matthews@dartmouth.edu (Jim Matthews)
Date: Tue, 08 Oct 1996 08:52:20 -0400
Organization: Dartmouth College
In article <AE7CD8F4-231425@128.206.76.57>, "Loren Peace"
<peace@coe.missouri.edu> wrote:
>Does anyone know of any good sources for ducuments about and/or tools for
>how to create OpenDoc container applications.
Besides the OpenDoc developer releases, available from the "DR Live!"
section of <http://www.opendoc.apple.com>, you should look into
OpenContent from 6prime (<http://www.6prime.com>). OpenContent is a bunch
of libraries that let applications call OpenDoc APIs and embed OpenDoc
parts.
--
Jim Matthews
Dartmouth Software Development
<http://www.dartmouth.edu/pages/softdev/>
---------------------------
From uzs90z@uni-bonn.de (Michael Schuerig)
Subject: ODF vs. PP-MacApp-TCL?
Date: Sun, 29 Sep 1996 22:16:16 +0200
Organization: RHRZ - University of Bonn (Germany)
The battle PowerPlant vs. MacApp vs. TCL is old an recurring. How about
ODF (OpenDoc Development Framework)? Is it another competitor or is it
playing a different game?
Michael
- -
Michael Schuerig
mailto:uzs90z@uni-bonn.de
http://www.rhrz.uni-bonn.de/~uzs90z/
+++++++++++++++++++++++++++
From adamnash@cs.stanford.edu (Adam Nash)
Date: Tue, 01 Oct 1996 00:58:32 -0800
Organization: Stanford University
It's playing a different game.
ODF, while not currently as mature as the other 3, offers great promise in
a number of ways. First, it is designed similarly to PowerPlant, in terms
of its view hierarchy and limited-forest-like structure. It also can
define custom view classes in resources, offering potentially
PowerPlant-like expandability.
ODF offers a few things that PowerPlant, TCL, and MacApp do not. ODF is
(as of the R3 release, due Nov/Dec?) is cross-platform. Plus, it includes
a cool, resolution-independent graphics framework. Lastly, it is designed
with OpenDoc in mind.
You could use PowerPart to develop a part, and eventually that may be a
viable way of porting older code. But these days, if you are going to
develop a part, use ODF. With visual resource editors around the bend,
it's the way to go...
- Adam
PS I didn't mention much of TCL or MacApp, basically because I feel
PowerPlant to be the more competitive of the three.
In article <199609292216161247713@rhrz-ts3-p5.rhrz.uni-bonn.de>,
uzs90z@uni-bonn.de (Michael Schuerig) wrote:
> The battle PowerPlant vs. MacApp vs. TCL is old an recurring. How about
> ODF (OpenDoc Development Framework)? Is it another competitor or is it
> playing a different game?
>
> Michael
>
> ---
> Michael Schuerig
> mailto:uzs90z@uni-bonn.de
> http://www.rhrz.uni-bonn.de/~uzs90z/
--
"The opinions expressed above do not necessarily represent
those of Stanford University, Apple Computer, or the
United States of America."
Adam Nash
CS 198 Coordinator Apple Research Labs
adamnash@cs.stanford.edu adamnash@taurus.apple.com
http://www-cs-students.stanford.edu/~adamnash
+++++++++++++++++++++++++++
From mpinkert@cc.gatech.edu (Mike Pinkerton)
Date: Mon, 07 Oct 1996 14:31:51 -0400
Organization: Georgia Tech
>With visual resource editors around the bend,
>[ODF] is the way to go...
I know you can use MW Constructor to create views for ODF. Have you ever
looked into doing this? I'm wondering how easy it really is....
--
Mike Pinkerton
mpinkert@cc.gatech.edu http://www.cc.gatech.edu/people/home/mpinkert/
Cyberdog: On the Internet, no one knows you're an OpenDoc part.
---------------------------
From Alastair Matthews <alimatthews@geocities.com>
Subject: PowerBook examples?
Date: Sat, 28 Sep 1996 13:21:11 +0000
Organization: Trinity College, Dublin, Ireland
hi..
Could anybody point me to where I can find examples of _using_ the
routines related to powerbooks in Power.h?
thanks; please email me if you have any suggestions.
-- alastair
- ---------------
Alastair Matthews
"Doubt grows with knowledge"
-Goethe
email
alimatthews@geocities.com
www
http://www.geocities.com/SiliconValley/Park/4727
+++++++++++++++++++++++++++
From blob@ricochet.net
Date: Wed, 02 Oct 1996 11:38:12 -0700
Organization: (none)
In article <324D2647.6A72@geocities.com>, alimatthews@geocities.com wrote:
> Could anybody point me to where I can find examples of _using_ the
> routines related to powerbooks in Power.h?
<http://devworld.apple.com/dev/sc.html> points to Apple's sample code.
There's probably something there; use their "find" page at
<http://devworld.apple.com/find.html>.
--
(Pointers to other Mac programming web sites at
<http://devworld.apple.com/dev/geeks.html>)
+++++++++++++++++++++++++++
From Mike Fahl <fahl@dataton.se>
Date: Sun, 06 Oct 1996 19:16:28 +0200
Organization: Dataton
I've used some of them in the past. Perhaps you could tell me which ones =
you're concerned about, and I may be able to give you some help.
Please CC any response as email=F6 as I don't visit this newsgroup very =
often.
Mike
---------------------------
From uzs90z@uni-bonn.de (Michael Schuerig)
Subject: Setting volume cache to write-through?
Date: Sun, 6 Oct 1996 15:52:25 +0200
Organization: RHRZ - University of Bonn (Germany)
Crashes during debugging are almost by definition not rare.
Unfortunately this sometimes corrupts the volume structure. One
countermeasure is to set the volume cache to the minimum size and as a
side effect slow disk access down.
CacheSaver by St. Clair Software might be a better solution as it
flushes the volumes periodically. But as it's a Control Panel (with
INIT) it might introduce compatibility problems. So I've written a
ten-line FBA that does (almost) the same.
Now I'm wondering if there's a better solution namely telling the File
Mgr once that it should write through the cache. I have no idea whether
this is possible. Does anyone know better?
Michael
- -
Michael Schuerig
mailto:uzs90z@uni-bonn.de
http://www.rhrz.uni-bonn.de/~uzs90z/
+++++++++++++++++++++++++++
From blob@ricochet.net
Date: Sun, 06 Oct 1996 14:54:45 -0700
Organization: (none)
In article <19961006155225814003@rhrz-ts2-p1.rhrz.uni-bonn.de>,
uzs90z@uni-bonn.de (Michael Schuerig) wrote:
> Crashes during debugging are almost by definition not rare.
> Unfortunately this sometimes corrupts the volume structure. One
> countermeasure is to set the volume cache to the minimum size and as a
> side effect slow disk access down.
>
> CacheSaver by St. Clair Software might be a better solution as it
> flushes the volumes periodically. But as it's a Control Panel (with
> INIT) it might introduce compatibility problems. So I've written a
> ten-line FBA that does (almost) the same.
>
> Now I'm wondering if there's a better solution namely telling the File
> Mgr once that it should write through the cache. I have no idea whether
> this is possible. Does anyone know better?
Look at IM:Files errata at the URL
<http://devworld.apple.com/dev/technotes/tn/tn1041.html>
It contains the information:
*****
Volume cache control bit in vcbAtrb
Page 2-79, Volume Control Blocks
Add the following bit definition to vcbAtrb for System 7.5 or later:
Bit Meaning
10 Set if the volume's blocks should not be cached (System 7.5
and later only). This allows access to RAM disk volumes to
bypass the File Manager cache. It has the same affect as
setting the noCache bit (bit 5 of ioPosMode) for all File
Manager reads and writes to the volume. Non-block aligned
requests may still be accessed through the cache.
*****
--
(Pointers to other Mac programming web sites at
<http://devworld.apple.com/dev/geeks.html>)
---------------------------
From bcland00@pop.uky.edu (Brian Landers)
Subject: Source code for opening GIF's and JPEG's?
Date: Thu, 03 Oct 1996 20:50:12 -0500
Organization: CampusMCI
This really ought to be in a FAQ(is it?)
Is there any Mac source code for reading and displaying GIF and JPEG format
files? I know you can read JPEG's using QuickTime, but I'd like to know how
it was done "in the old days". What would REALLY be cool(and what I may
write if it doesn't already exist) is an extension of the PowerPlant
LPicture class that will display a GIF or JPEG, given a FileSpec. IMHO,
that would be a VERY useful class for many different things, not just my
application(yet another image map editor).
Thanks in advance, email or Usenet replies are fine,
Brian Landers
bcland00@pop.uky.edu
+++++++++++++++++++++++++++
From tgl@netcom.com (Tom Lane)
Date: Fri, 4 Oct 1996 05:18:16 GMT
Organization: Netcom Online Communications Services
bcland00@pop.uky.edu (Brian Landers) writes:
> Is there any Mac source code for reading and displaying GIF and JPEG format
> files? I know you can read JPEG's using QuickTime, but I'd like to know how
> it was done "in the old days".
Actually, there never were any "old days" as far as JPEG goes ---
QuickTime has supported JPEG for just about as long as the format's
been popular.
You can certainly use the IJG JPEG code on a Mac if you feel like it
(see ftp.uu.net:/graphics/jpeg/ for source code). The QuickTime code
is faster --- at least on 68K processors; I don't think they've optimized
it as carefully for PPC. Reasons for using the IJG code anyway include:
* direct support for net-standard JFIF files;
* it's more robust with corrupted input;
* QT doesn't handle progressive JPEG.
And if you like having source, there's no comparison :-)
> What would REALLY be cool(and what I may
> write if it doesn't already exist) is an extension of the PowerPlant
> LPicture class that will display a GIF or JPEG, given a FileSpec.
If you tackle this, I'd suggest a wrapper around the IJG decoder
as a good way to proceed for the JPEG part of it.
GIF code is available all over the place but you should think twice
before putting it into any money-making product. Unisys will be wanting
a cut of your sales as patent royalties. (I recently heard that they
are now coming down on freeware authors too, which if true has to be
one of the dumbest corporate moves since New Coke. That'll just hasten
the move away from GIF and towards PNG, without making them a dime.)
regards, tom lane
organizer, Independent JPEG Group
member, PNG development group
+++++++++++++++++++++++++++
From Greg Simon <grs124@psu.edu>
Date: Thu, 03 Oct 1996 23:53:34 +0000
Organization: Penn State University
Brian Landers wrote:
>
> Is there any Mac source code for reading and displaying GIF and JPEG format
> files? I know you can read JPEG's using QuickTime, but I'd like to know how
> it was done "in the old days". What would REALLY be cool(and what I may
> write if it doesn't already exist) is an extension of the PowerPlant
hi Brian-
Download the latest XV source code (3.x, I think). It has the code for
reading and writing most of today's popular image formats. I've used
code
from it often in various projects and things. Very handy.
Only down side is that nearly all the routines hit the std C lib file
routines pretty heavily, so to replace them all with toolbox calls can
be tricky.
Use Infoseek or whatever to locate XV. Good Luck.
Greg
+++++++++++++++++++++++++++
From dbsears@ix.netcom.com (Daniel Sears)
Date: 4 Oct 1996 18:38:34 GMT
Organization: personal
Tom Lane's IJG code is quite excellent. But you should look at
the GraphicsImporter services in the Quicktime 2.5. It transparently
imports PICT, GIF, JPEG, SGI etc. in the proverbial five lines of code.
--Dan
+++++++++++++++++++++++++++
From lwjames@csn.net (Dr. Lawrence W. James)
Date: Fri, 04 Oct 1996 15:34:12 -0600
Organization: James Associates
In article <dbsears-0410961141290001@sfo-ca5-23.ix.netcom.com>,
dbsears@ix.netcom.com (Daniel Sears) wrote:
>you should look at
>the GraphicsImporter services in the Quicktime 2.5. It transparently
>imports PICT, GIF, JPEG, SGI etc. in the proverbial five lines of code.
Where is the documentation on how to do this?
+++++++++++++++++++++++++++
From Raul Sobon <a.sobon@pharmacology.unimelb.edu.au>
Date: Mon, 07 Oct 1996 09:44:38 +1000
Organization: BMU
Tom Lane wrote:
>
> bcland00@pop.uky.edu (Brian Landers) writes:
> > Is there any Mac source code for reading and displaying GIF and JPEG format
> > files? I know you can read JPEG's using QuickTime, but I'd like to know how
> > it was done "in the old days".
>
> Actually, there never were any "old days" as far as JPEG goes ---
> QuickTime has supported JPEG for just about as long as the format's
> been popular.
>
> You can certainly use the IJG JPEG code on a Mac if you feel like it
> (see ftp.uu.net:/graphics/jpeg/ for source code). The QuickTime code
> is faster --- at least on 68K processors; I don't think they've optimized
> it as carefully for PPC. Reasons for using the IJG code anyway include:
> * direct support for net-standard JFIF files;
> * it's more robust with corrupted input;
> * QT doesn't handle progressive JPEG.
> And if you like having source, there's no comparison :-)
>
> > What would REALLY be cool(and what I may
> > write if it doesn't already exist) is an extension of the PowerPlant
> > LPicture class that will display a GIF or JPEG, given a FileSpec.
>
> If you tackle this, I'd suggest a wrapper around the IJG decoder
> as a good way to proceed for the JPEG part of it.
>
> GIF code is available all over the place but you should think twice
> before putting it into any money-making product. Unisys will be wanting
> a cut of your sales as patent royalties. (I recently heard that they
> are now coming down on freeware authors too, which if true has to be
> one of the dumbest corporate moves since New Coke. That'll just hasten
> the move away from GIF and towards PNG, without making them a dime.)
>
> regards, tom lane
> organizer, Independent JPEG Group
> member, PNG development group
What is PNG??
-Raul
+++++++++++++++++++++++++++
From dunham@pensee.com (David Dunham)
Date: 7 Oct 1996 17:41:01 GMT
Organization: Pensee Corporation
In article <dbsears-0410961141290001@sfo-ca5-23.ix.netcom.com>,
dbsears@ix.netcom.com (Daniel Sears) wrote:
> Tom Lane's IJG code is quite excellent. But you should look at
> the GraphicsImporter services in the Quicktime 2.5. It transparently
> imports PICT, GIF, JPEG, SGI etc. in the proverbial five lines of code.
Where's this documented? Our graphic format programmer knows this exists
but hasn't found how to do it.
David Dunham Pensee Corporation dunham@pensee.com
Voice/Fax: 206 783 7404 http://www.pensee.com/dunham/
"I say we should listen to the customers and give them what they want."
"What they want is better products for free." --Scott Adams
+++++++++++++++++++++++++++
From squires@crl.com (Scott Squires)
Date: Mon, 07 Oct 1996 22:51:58 -0800
Organization: Puffin Designs
In article <lwjames-ya023180000410961534120001@news-2.csn.net>,
lwjames@csn.net (Dr. Lawrence W. James) wrote:
>In article <dbsears-0410961141290001@sfo-ca5-23.ix.netcom.com>,
>dbsears@ix.netcom.com (Daniel Sears) wrote:
>
>>you should look at
>>the GraphicsImporter services in the Quicktime 2.5. It transparently
>>imports PICT, GIF, JPEG, SGI etc. in the proverbial five lines of code.
>
>Where is the documentation on how to do this?
<http://www.QuickTimeFAQ.org/>
-scott
Scott Squires "Insert funny stuff here"
squires@crl.com
ScottSquir@aol.com
---------------------------
From mruggiero@access.ch (Markus Ruggiero)
Subject: Symantec linker and unresolved symbols
Date: Fri, 04 Oct 1996 08:54:33 +0200
Organization: ruCoTec Consulting and Technologies
I have asked the Symantec help desk about the following. Unfortunately
Symantec is of no help in this case. Does anybody have an idea? Can the
linker be hacked? fooled?
My message to Symantec:
Environment:
PowerMac 7500, latest Symantec C++ Environment
The linker flags unresolved symbols as errors. This prevents from running a
partially completed application.
I am porting a large application from Windows to Macintosh. This
application consists of over 400 source files (not including header files)
with over 500'000 lines of C code. About 20% of this code is system
dependent. It would be very helpful if I could build the Macintosh version
incrementally and _RUN_ it under debugger control. That way I could
implement function by function without having to resolve each and every
symbol. As there are literally thousands of routines that call other
routines directly and indirectly it would be too much work to provide
linkable dummies for not-yet ported stuff. If the linker issued a warning
instead of an error that would be great. I am absolutely aware of the fact
that my application is likely to crash when hitting such an unresolved
symbol but during development I know what parts of the code do not yet
work. I used to do development on Digital OpenVMS with various compilers.
The VMS linker generates these warnings and the executable is runable.
As the linker on the Macintosh adds code (stubs, glue, init routines etc)
anyway it could add a small piece of code that is automatically referenced
when the linker finds an unresolvable symbol. This code could just drop
into Macsbug issuing a little message including the symbol name (some
debugstr ("foo called") perhaps including __FILE__ and __LINE__).
There should be a linker preference to switch from warning to error.
Thank you for listening
- -markus---
and the answer was
Hello,
The Symantec linker does not offer such a feature. Unfortunately you
will need to satisfy each symbol requirement.
Patrick Hoonhout
Symantec Product Support
Win Internet Tools (C++/Cafe)
--
e-mail: mruggiero@access.ch
+++++++++++++++++++++++++++
From Dave Ewing <dewing@symantec.com>
Date: Fri, 04 Oct 1996 11:10:08 -0600
Organization: Symantec Corp.
Markus Ruggiero wrote:
>
> I have asked the Symantec help desk about the following. Unfortunately
> Symantec is of no help in this case. Does anybody have an idea? Can the
> linker be hacked? fooled?
>
> ...
> The linker flags unresolved symbols as errors. This prevents from running a
> partially completed application.
>
> ...
> and the answer was
>
> Hello,
>
> The Symantec linker does not offer such a feature. Unfortunately you
> will need to satisfy each symbol requirement.
>
> Patrick Hoonhout
> Symantec Product Support
> Win Internet Tools (C++/Cafe)
>
> --
> e-mail: mruggiero@access.ch
Patrick's response was somewhat terse, but correct. I'm not personally
aware of any
linker that would do what you want (for C or C++, that is), though it
would be usefull.
I'd suggest that you take the linker error window, save it to a file,
and convert the
text into the appropriate stub routines. A few good editing macros
should do the trick.
Dave
Visual Cafe Debugger Engineer
Symantec Corp.
+++++++++++++++++++++++++++
From Brad Howes <bhowes@cssun3.corp.mot.com>
Date: 07 Oct 1996 09:45:39 -0700
Organization: Motorola, Inc.
>>>> 'Markus Ruggiero (mruggiero@access.ch)' asked the following:
[snip]
MR> I am porting a large application from Windows to Macintosh. This
MR> application consists of over 400 source files (not including header files)
MR> with over 500'000 lines of C code. About 20% of this code is system
MR> dependent. It would be very helpful if I could build the Macintosh version
MR> incrementally and _RUN_ it under debugger control. That way I could
MR> implement function by function without having to resolve each and every
MR> symbol. As there are literally thousands of routines that call other
MR> routines directly and indirectly it would be too much work to provide
MR> linkable dummies for not-yet ported stuff. If the linker issued a warning
MR> instead of an error that would be great.
[snip]
Use AppleScript, Frontier, or MacPerl to scan your C files and generate
placeholder routines - or perhaps there's a way to declare said routines as
members of a shared library to be resolved at runtime. Regardless, there is
some work involved, though it should be easy to automate.
--
Brad Howes Motorola E-Mail ID: XBH001
EMT Development SMTP E-Mail: bhowes@cssun3.corp.mot.com
Motorola Corporate - MD H1780 Voice: 602 441 1522 Fax: 602 441 5455
---------------------------
From Mark & Erika Reichert <reicher1@gate.net>
Subject: TCP-IP apps automatically dialing PPP, etc.
Date: Sun, 06 Oct 1996 08:21:36 -0400
Organization: CyberGate, Inc.
Does anyone know how applications like Eudora, Netscape, Explorer, etc.
automatically dial your Internet Service Provider via PPP, SLIP, etc.
when needed? The MacTCP and OpenTransport calls don't seem to cause
this to happen. Does this happen via the Mac toolbox at all or is there
a completely different mechanism at work?
Thanks in advance.
+++++++++++++++++++++++++++
From kindall@manual.com (Jerry Kindall)
Date: Sun, 06 Oct 1996 13:39:24 -0400
Organization: Manual Labor
In article <3257A44D.1712@gate.net>, reicher1@gate.net wrote:
>Does anyone know how applications like Eudora, Netscape, Explorer, etc.
>automatically dial your Internet Service Provider via PPP, SLIP, etc.
>when needed? The MacTCP and OpenTransport calls don't seem to cause
>this to happen. Does this happen via the Mac toolbox at all or is there
>a completely different mechanism at work?
When an application attempts to send an IP packet, Open Transport or
MacTCP passes the request to the Link Access Protocol (LAP), which is a
program such as FreePPP or MacSLIP. The LAP knows whether the connection
is up or down, and dials the modem if necessary. There are no specific OS
calls to tell the LAP to bring the connection up, although some LAPs
provide Apple Events for the purpose.
>Thanks in advance.
--
Jerry Kindall <kindall@manual.com>
Manual Labor <http://www.manual.com/>
Technical Writing; Internet & WWW Consulting
---------------------------
From fchang@qualcomm.com (Fang-Pin Chang)
Subject: THINK Reference
Date: Tue, 01 Oct 1996 13:13:55 -0800
Organization: Qualcomm Incorporated
Does anyone know where I can get my hands on THINK Reference? A search
through Alta Vista revealed many links to Symantec, but none of them are
valid....
--
Fang-Pin Chang __ ___
fchang@qualcomm.com | | _ | _ _ .__ .__ | .__ _
_________________________|_\| (_| (_| | (_ (_) ||| |||___|_ | | (_ ._
+++++++++++++++++++++++++++
From Online@MacTech.com ( nick.c @MT )
Date: Tue, 01 Oct 1996 20:02:55 -0800
Organization: MacTech Magazine
fchang@qualcomm.com (Fang-Pin Chang) wrote:
>Does anyone know where I can get my hands on THINK Reference? A search
>through Alta Vista revealed many links to Symantec, but none of them are
>valid....
It's now owned by Xplain corp, the folks who bring you MacTech
Magazine :-)
Check out the following for more info:
<http://www.mactech.com/mactech.com/cdrom/>
____Nicholas C. DeMello, Ph.D.________________________________________
Online from MacTech Magazine, for Mac OS Programmers and Developers
http://www.MacTech.com/
_/ _/ _/ _/_/_/ _/ _/
Chemistry: Nick@chem.UCLA.edu _/_/ _/ _/ _/ _/ _/_/_/
MacTech: Online@MacTech.com _/ _/_/ _/ _/ _/ _/
http://www.chem.ucla.edu/~nick/ _/ _/ _/_/_/ _/ _/
+++++++++++++++++++++++++++
From Online@MacTech.com ( nick.c @MT )
Date: Tue, 01 Oct 1996 20:11:27 -0800
Organization: MacTech Magazine
fchang@qualcomm.com (Fang-Pin Chang) wrote:
>Does anyone know where I can get my hands on THINK Reference? A search
>through Alta Vista revealed many links to Symantec, but none of them are
>valid....
It's now owned by Xplain corp, the folks who bring you MacTech
Magazine :-)
Among otherways to acquire it, you can get it on a CD with
all the MacToolbox and ANSI databases, plus all 11 years of
MacTech magazine with hypertext links to and from the
Toolbox DB. (Let's you get more detailed discussions and
examples as well as the regular TR fair). Check out the
following for more info:
<http://www.mactech.com/cdrom/>
.
____Nicholas C. DeMello, Ph.D.________________________________________
Online from MacTech Magazine, for Mac OS Programmers and Developers
http://www.MacTech.com/
_/ _/ _/ _/_/_/ _/ _/
Chemistry: Nick@chem.UCLA.edu _/_/ _/ _/ _/ _/ _/_/_/
MacTech: Online@MacTech.com _/ _/_/ _/ _/ _/ _/
http://www.chem.ucla.edu/~nick/ _/ _/ _/_/_/ _/ _/
+++++++++++++++++++++++++++
From shawn@ultranet.com (Shawn O'Donnell)
Date: Tue, 01 Oct 1996 23:42:46 -0400
Organization: Cardiff Communications
In article <fchang-0110961313550001@fchang-mac.qualcomm.com>,
fchang@qualcomm.com (Fang-Pin Chang) wrote:
> Does anyone know where I can get my hands on THINK Reference?
I THINK that Symantec sold THINK Reference to the publishers of MacTech
magazine. You can get a copy of THINK Reference 2.0 from "Developer
Depot" at Xplain Corp's web site: www.devdepot.com
You may need to buy the MacTech vols 1-11 CD-ROM ($89) to get THINK
Reference. It's not a bad deal, though. For about the price of the
original, you get a ton of fun stuff.
Caveat emptor--THINK Reference covers the old Inside Mac volumes, only. I
think that Xplain is trying to get Apple to license the new series of IM
so that they can package it using the THINK Reference search engine. (Or
was that Metrowerks?) Whoever. Wish them luck.
--Shawn
--
Shawn O'Donnell shawn@ultranet.com
k3hi@wa1phy.ampr.org Framingham, Massachusetts
+++++++++++++++++++++++++++
From Online@MacTech.com ( nick.c @MT )
Date: Wed, 02 Oct 1996 10:15:04 -0800
Organization: MacTech Magazine
shawn@ultranet.com (Shawn O'Donnell) wrote:
>Caveat emptor--THINK Reference covers the old Inside Mac volumes, only. I
>think that Xplain is trying to get Apple to license the new series of IM
>so that they can package it using the THINK Reference search engine. (Or
>was that Metrowerks?) Whoever. Wish them luck.
Xplain is interested in licensing the new material, and we're
waiting for Apple to get back to us on it (feel free to send
a quick note to devsupport@apple.com encouraging them to do
so :-).
But keep in mind that the vast majority of toolbox commands
are covered in the current TR data bases--not too much stuff
needs to be added, and most users won't notice when we do.
We just want to "top off" the current data bases, so we
have all the bases covered.
BTW, there's a beta version of TR 2.2 on the CD as well
as the current release of the engine--feel free to send
feedback on it to us (you can send comments/observatins/bugs
to me and I'll pass 'em on).
.
____Nicholas C. DeMello, Ph.D.________________________________________
Online from MacTech Magazine, for Mac OS Programmers and Developers
http://www.MacTech.com/
_/ _/ _/ _/_/_/ _/ _/
Chemistry: Nick@chem.UCLA.edu _/_/ _/ _/ _/ _/ _/_/_/
MacTech: Online@MacTech.com _/ _/_/ _/ _/ _/ _/
http://www.chem.ucla.edu/~nick/ _/ _/ _/_/_/ _/ _/
+++++++++++++++++++++++++++
From bierman@apple.com (Peter Bierman)
Date: Wed, 02 Oct 1996 18:42:18 -0800
Organization: I do not speak for Apple Computer!
In article <Online-0210961015040001@news.ucla.edu>, Online@MacTech.com (
nick.c @MT ) wrote:
> But keep in mind that the vast majority of toolbox commands
> are covered in the current TR data bases--not too much stuff
> needs to be added, and most users won't notice when we do.
> We just want to "top off" the current data bases, so we
> have all the bases covered.
Excellent, but please take the time to add the notes and sample code that
makes TRef still more usefull than QuickView for leaning how to use a
function you haven't used before. QV is awesome in it's completeness, but
when I want to read about how an API call is used, I still use TRef.
-pmb
--
lunatic@cs.wisc.edu <A HREF="http://dax.cs.wisc.edu/~lunatic/">me</a>
Q: Am I unique and special in the universe?
A: There are over 10,000 major university and corporate sites running
exact duplicates of you in the present release version.
+++++++++++++++++++++++++++
From earl@netcom.com (Earl Vickers)
Date: Mon, 7 Oct 1996 22:06:34 GMT
Organization: none
In article <fchang-0110961313550001@fchang-mac.qualcomm.com>,
Fang-Pin Chang <fchang@qualcomm.com> wrote:
>Does anyone know where I can get my hands on THINK Reference? A search
>through Alta Vista revealed many links to Symantec, but none of them are
>valid....
I have a copy for sale, $35 or best offer.
--
-- Earl Vickers earl@netcom.com
---------------------------
From rtt@synapse.net (rtt)
Subject: Think C, Symantec C
Date: 7 Oct 1996 02:47:23 GMT
Organization: neuron
Whoah, have I been sleeping or something. I have a problem which would
probably resolve itself to either finger trouble or
installation/corruption problem. I went to the Symantec site to check
around and I find no further references to Symantec C or Think C.
Has Symantec dropped these products, like, that's it, all gone and I
now have to find another C tool?
By the by, the following code, produces 0 bytes for each printf,
although on my Alpha (WIndows NT) and my DECstation (UNIX), it produces
the expected results. Any ideas?
-=-=-=-=-=-=-=
#include <stdio.h>
main()
{
printf("char has a size of %d bytes.\n", sizeof(char));
printf("int has a size of %d bytes.\n", sizeof(int));
printf("short has a size of %d bytes.\n", sizeof(short));
printf("long has a size of %d bytes.\n", sizeof(long));
printf("float has a size of %d bytes.\n", sizeof(float));
printf("double has a size of %d bytes.\n", sizeof(double));
return 0;
}
=-=-=-=-=-=-=-
This mind left BLANK intentionaly!
+++++++++++++++++++++++++++
From tree@apple.com (Tom Emerson)
Date: Mon, 07 Oct 1996 09:36:59 -0400
Organization: Apple Computer, Inc.
In article <539qvr$g1i$1@piano.synapse.net>, rtt@synapse.net (rtt) wrote:
>Whoah, have I been sleeping or something. I have a problem which would
>probably resolve itself to either finger trouble or
>installation/corruption problem. I went to the Symantec site to check
>around and I find no further references to Symantec C or Think C.
Yes, the marketing wizards who control the Symantec web presence evidently
feel that non-Java development tools are unimportant.
>Has Symantec dropped these products, like, that's it, all gone and I
>now have to find another C tool?
No, the products haven't been dropped.
>By the by, the following code, produces 0 bytes for each printf,
>although on my Alpha (WIndows NT) and my DECstation (UNIX), it produces
>the expected results. Any ideas?
That's because sizeof() returns type size_t, which is defined as an
unsigned int for SC. You're int size is probably 4-bytes, but the version
of the ANSI library you're using expects 2-byte ints, so printf is only
looking at the upper word of the sizeof() result, which is 0. So either
recompile the ANSI library to use 4-byte ints or change "%d" to "%ld" and
you'll get what you expect.
-tre
--
Tom Emerson Cambridge R&D
Senior Software Engineer Apple Computer, Inc.
<mailto:tree@apple.com> <http://www.tiac.net/users/tree>
+++++++++++++++++++++++++++
From symscott@devtools.symantec.com (Symantec/Scott Morison)
Date: Mon, 07 Oct 1996 11:58:13 -0800
Organization: Symantec Corporation
In article <tree-ya[big number]@news.apple.com>, tree@apple.com (Tom
Emerson) wrote:
> In article <539qvr$g1i$1@piano.synapse.net>, rtt@synapse.net (rtt) wrote:
>
> >Whoah, have I been sleeping or something. I have a problem which would
> >probably resolve itself to either finger trouble or
> >installation/corruption problem. I went to the Symantec site to check
> >around and I find no further references to Symantec C or Think C.
>
> Yes, the marketing wizards who control the Symantec web presence evidently
> feel that non-Java development tools are unimportant.
We just (last week) moved and completely remodled our web site and there
are still several areas that are waiting for completion. Unfortunately,
our Development Tools section is one of the areas awaiting post. It should
be up in the next week or so. Sorry for the confusion. (F=ma;)
> >Has Symantec dropped these products, like, that's it, all gone and I
> >now have to find another C tool?
>
> No, the products haven't been dropped.
"Rumors of [our] death have been greatly exaggerated." - Twain
-
Scott Morison
Symantec Internet Tools Technical Support
Symantec Corporation
-
--
For more information on this or any other C/C++/Pascal/Cafe
issue please feel free to post us a note on our News Server or call:
News Server : service.symantec.com
Tech Support: 541/465-8470
Cust Service: 800/441-7234
+++++++++++++++++++++++++++
From rtt@synapse.net (rtt)
Date: 8 Oct 1996 04:12:56 GMT
Organization: neuron
Thankyou, thankyou, thankyou, one and all. Yes, as I had suspected,
finger trouble on my part. I'd say I feel foolish on this, but I've
been a system administrator for so long, my coding is very poor, in
addition to my understanding of C. I thank everyone for their gracious
input.
rtt
This mind left BLANK intentionaly!
---------------------------
From Pieter.Proot@med.kuleuven.ac.be (Pieter Proot)
Subject: Think Pascal question
Date: Tue, 01 Oct 1996 15:36:06 +0200
Organization: KU Leuven
Hello,
I was wondering if Think Pascal, from Symantic, Vs. 4.01 is the latest
version of this software, and if it is still supported? Where can I find
updates and new libraries for it?
Thanks in advance.
Pieter
Pieter.Proot@med.kuleuven.ac.be
+++++++++++++++++++++++++++
From "Tedd F. Sperling" <sperling@sperling.com>
Date: Wed, 02 Oct 1996 09:06:44 +0000
Organization: Sperling Corporation
Pieter Proot wrote:
>
> Hello,
>
> I was wondering if Think Pascal, from Symantic, Vs. 4.01 is the latest
> version of this software, and if it is still supported? Where can I find
> updates and new libraries for it?
>
> Thanks in advance.
>
> Pieter
>
> Pieter.Proot@med.kuleuven.ac.be
--
Hi:
The latest version I have is 4.0.2.
While I purchased this version in January, 1996, I also purchased
Symantec C++ at the same time.
To my surprise, Pascal came with C++. So, in fact, I actually purchased
Pascal when I didn't have to.
My inquiries to Symantec about this have fallen on deaf hears. So, don't
be alarmed if you find your questions and inquiries about Pascal going
unanswered.
IMHO, they have problems.
tedd
____
|[ ]| mac programmer tedd f. sperling
|[__]| mailto: sperling@sperling.com
|___-| http://www.sojourn.com/~sperling/resume.html
- -
+++++++++++++++++++++++++++
From zaphod@dna.ca (Zaphod)
Date: Wed, 2 Oct 1996 14:37:34 -0400
Organization: dna.ca
Pieter.Proot@med.kuleuven.ac.be,Internet writes:
>I was wondering if Think Pascal, from Symantic, Vs. 4.01 is the latest
>version of this software, and if it is still supported? Where can I
>find
>updates and new libraries for it?
Version 4.02 is the latest version of THINK Pascal that I've ever
seen/used.
I can't remember the FTP site that contains the update though. Seems
to me it was one of the default bookmarks that came with Anarchie.
- ------
-Zaphod.
- ------
+++++++++++++++++++++++++++
From ingemar@lysator.liu.se (Ingemar Ragnemalm)
Date: 3 Oct 1996 08:51:24 GMT
Organization: (none)
"Tedd F. Sperling" <sperling@sperling.com> writes:
>Pieter Proot wrote:
>> I was wondering if Think Pascal, from Symantic, Vs. 4.01 is the latest
>> version of this software, and if it is still supported? Where can I find
>> updates and new libraries for it?
>The latest version I have is 4.0.2.
>While I purchased this version in January, 1996, I also purchased
>Symantec C++ at the same time.
>To my surprise, Pascal came with C++. So, in fact, I actually purchased
>Pascal when I didn't have to.
The Think Pascal in SC++ is, as far as I know, 4.5d4 or something like that.
4.0.2 is the latest "final" version, while 4.5 is only in "d" version.
I think it is very nice that they include this preliminary version in
SC++. I have 4.0.2, but consider buying SC++ just to get the LS Pascal
compiler and TP 4.5 in the absolutely latest version - and to be able to
tell Symantec that I am still willing to pay for their Pascal compilers.
(I think I bought Think Pascal 4 in 1991, so that was a while back.)
There are also new interfaces available, that you can download from Symantec.
At their site, you can also get an updater from 4.0.1 to 4.0.2. It fixes
a few bugs.
>My inquiries to Symantec about this have fallen on deaf hears. So, don't
>be alarmed if you find your questions and inquiries about Pascal going
>unanswered.
My support questions to Symantec has always been unanswered, even when Think
Pascal was actively supported. If you need help with Think Pascal, check out
comp.lang.pascal.mac.
--
- -
Ingemar Ragnemalm, PhD
Image processing, Mac shareware games
E-mail address: ingemar@isy.liu.se or ingemar@lysator.liu.se
+++++++++++++++++++++++++++
From laurent@planon_4.planon.qc.ca (Laurent Daudelin)
Date: 8 Oct 1996 17:21:18 GMT
Organization: Planon TELEXPERTISE, Inc.
In <msg2822.thr-904b3ff4.2caaf86@dna.ca> Zaphod wrote:
> Pieter.Proot@med.kuleuven.ac.be,Internet writes:
> >I was wondering if Think Pascal, from Symantic, Vs. 4.01 is the latest
> >version of this software, and if it is still supported? Where can I
> >find
> >updates and new libraries for it?
>
> Version 4.02 is the latest version of THINK Pascal that I've ever
> seen/used.
> I can't remember the FTP site that contains the update though. Seems
> to me it was one of the default bookmarks that came with Anarchie.
>
> --------
> -Zaphod.
> --------
>
There is also a 4.5dr1 (or dr2?) on the latest Symantec C++ CD, v8 rel 5.
Didn't have a chance to play with it but, as I may recall, it was supposed to
be compatible with the Universal Headers.
-Laurent.
--
******************************************************************
Laurent Daudelin, Lead Software Engineer- Planon TELEXPERTISE Inc.
laurent@planon.qc.ca <-- NeXTMail welcome! (MIME Mail welcome too!)
---------------------------
From dstone@chem.utoronto.ca (David Stone)
Subject: Traps.h & asm.h in Sym C-C++ 6
Date: Mon, 7 Oct 1996 14:11:30 GMT
Organization: University of Toronto Chemistry
Should I be using asm.h or Traps.h for C compilation with the
Universal Interfaces??
Background:
I'm in the process of trying to get the Universal Interfaces 2.1.3
to work with my Sym C/C++ 6.0. What I've done so far is create
two folders outside the development tree, one for the interface
files and MacHeader shipped with the compiler, the other for the
Universal Interfaces. I then switched the headers/MacHeader files
in the "Mac #includes" folder so that I'm currently working with
the UI 2.1.3 headers. I've recompiled MacHeaders and am seeing
how much of an immediate effect this has on my existing projects.
I'm running into problems with doubly-defined trap names between
asm.h (in the THINK #includes folder) and Traps.h (in the UI 2.1.3
folder).
The code in question is something hacked out of sample code in
"Think Ref", which provides a routine to check if a given
trap is available. Both MacHeaders are #including <asm.h> and
not <Traps.h>. The source file then #includes <Traps.h>.
When I compile using the original headers, there is no problem,
but when I compile with the UI headers, I get "invalid redclaration
of _ShutDown". Since _ShutDown is defined in BOTH versions of
Traps.h, I don't understand what's going on. If I remove the
#include <Traps.h>, then I don't have some of the macros I need
in the code, with predictable results.....
So, do I NEED the asm.h file included in my projects and, if so,
is there a way of also including Traps.h which won't cause these
problems AND will also be compatible with the original header
files. (I read the compiler manual, but it wasn't terribly
clear on this....)
Thanks for any insight,
Dave Stone
+++++++++++++++++++++++++++
From tree@apple.com (Tom Emerson)
Date: Tue, 08 Oct 1996 09:25:02 -0400
Organization: Apple Computer, Inc.
In article <dstone-071096100003@csgmac.chem.utoronto.ca>,
dstone@chem.utoronto.ca (David Stone) wrote:
>Should I be using asm.h or Traps.h for C compilation with the
>Universal Interfaces??
You should be using <Traps.h> for all new code. Indeed, I deprecated the
entire contents of the "THINK #includes" for the 8.0 release (except for
SetUpA4.h), though some components (like the TCL) were never updated to
reflect that.
You *will* have to tweak your code a bit, or work out some hackery with
asm.h so that it will use Traps.h instead.
Similarly you should *not* use <LoMem.h> either, rather use the Universal
LowMem.h instead.
-tre
--
Tom Emerson Cambridge R&D
Senior Software Engineer Apple Computer, Inc.
<mailto:tree@apple.com> <http://www.tiac.net/users/tree>
---------------------------
From cjones@mantle.colorado.edu (Craig Jones)
Subject: VIP-Basic: Opinions?
Date: Tue, 1 Oct 96 22:32:31 GMT
Organization: CIRES, University of Colorado at Boulder
I have an old (long) QuickBASIC code I've been dreading getting into
something more modern. I bought and used FutureBasic for awhile and was
disappointed by the incredibly poor performance of floating point operations
(this is scientific programming) and a large number of system corruptions I
managed to produce.
I looked over the web page for VIP Basic (at www.mstay.com) and downloaded
their demo (v2.0R2, I think). It seems very slick and nice, but I'm not
sure how it really does as at producing compiled code, especially floating
point speed, and how robust a real working version really is. So I'd
appreciate any comments from users, happy or sad; comments on ease of
porting lengthy old QB would be helpful, too.
Craig Jones cjones@mantle.colorado.edu
Research Associate, CIRES, University of Colorado, Boulder
WWW: http://cires.colorado.edu/people/jones.craig/CHJ_home.html
+++++++++++++++++++++++++++
From "Tedd F. Sperling" <sperling@sperling.com>
Date: Wed, 02 Oct 1996 09:16:40 +0000
Organization: Sperling Corporation
Craig Jones wrote:
>
> I have an old (long) QuickBASIC code I've been dreading getting into
> something more modern. I bought and used FutureBasic for awhile and was
> disappointed by the incredibly poor performance of floating point operations
> (this is scientific programming) and a large number of system corruptions I
> managed to produce.
>
> I looked over the web page for VIP Basic (at www.mstay.com) and downloaded
> their demo (v2.0R2, I think). It seems very slick and nice, but I'm not
> sure how it really does as at producing compiled code, especially floating
> point speed, and how robust a real working version really is. So I'd
> appreciate any comments from users, happy or sad; comments on ease of
> porting lengthy old QB would be helpful, too.
>
> Craig Jones cjones@mantle.colorado.edu
> Research Associate, CIRES, University of Colorado, Boulder
> WWW: http://cires.colorado.edu/people/jones.craig/CHJ_home.html
Hi:
I do math calculations with FB and have never had any problems.
If you need speed, then you can always use SANE from FB.
Also, FB is coming out soon with a new version that incorporates easier
SANE access.
tedd
--
____
|[ ]| mac programmer tedd f. sperling
|[__]| mailto: sperling@sperling.com
|___-| http://www.sojourn.com/~sperling/resume.html
- -
+++++++++++++++++++++++++++
From pecora@zoltar.nrl.navy.mil (Louis M. Pecora)
Date: Wed, 02 Oct 1996 10:11:12 +0100
Organization: Naval Research Laboratory
In article <cjones.1194596791A@news.colorado.edu>,
cjones@mantle.colorado.edu (Craig Jones) wrote:
> I have an old (long) QuickBASIC code I've been dreading getting into
> something more modern. I bought and used FutureBasic for awhile and was
> disappointed by the incredibly poor performance of floating point operations
> (this is scientific programming) and a large number of system corruptions I
> managed to produce.
>
> I looked over the web page for VIP Basic (at www.mstay.com) and downloaded
> their demo (v2.0R2, I think). It seems very slick and nice, but I'm not
> sure how it really does as at producing compiled code, especially floating
> point speed, and how robust a real working version really is. So I'd
> appreciate any comments from users, happy or sad; comments on ease of
> porting lengthy old QB would be helpful, too.
Future Basic, I believe, uses BCD arithmetic (no FPU use) so it will be
very slow for floating point.
In the past I've used True Basic and liked it very much. It is easy to
use, standard (written by the original BASIC inventors), and has quick and
simple graphics. For good numerical performance (for a BASIC -- still
slower than Fortan or C) and ease of use and setup, I highly recommend it.
If you really want the best performance or you want to get into the
nitty-gritty of Mac UI/API programming it may not be the best. I think
there are some hooks into the system so you can do some toolbox stuff, but
that's not True Basic's forte.
Unfortunately, I don't have contact information for them here, but I bet a
web search on "True Basic" would show something. Anyone else have contact
info?
--
Louis M. Pecora
pecora@zoltar.nrl.navy.mil
== My views and opinions are not those of the U.S. Navy. ==
- ------------------------------------------------------------------
* Check out the home page for the 4th Experimental Chaos Conference!
http://natasha.umsl.edu/Exp_Chaos4
- -------------------------------------------------------------------
+++++++++++++++++++++++++++
From Jeff Pearson <qualtech@qualtech-inc.com>
Date: Wed, 02 Oct 1996 12:12:48 -0700
Organization: Monumental Network Systems
Craig Jones wrote:
...
> I looked over the web page for VIP Basic (at www.mstay.com) and downloaded
> their demo (v2.0R2, I think). It seems very slick and nice, but I'm not
> sure how it really does as at producing compiled code, especially floating
> point speed, and how robust a real working version really is. So I'd
> appreciate any comments from users, happy or sad; comments on ease of
> porting lengthy old QB would be helpful, too....
I can not specifically tell you about VIP-Basic, but here at work I program with VIP-C
and the built-in compiler will make applications for you but the size and speed of
running those applications is slow. If you have CodeWarrior 9 you can use that to
compile your VIP-C code (linking, etc. between both of them is built into VIP-C).
Hope that helps you a little bit.
Jeff
+++++++++++++++++++++++++++
From "Thomas L. Ferrell" <ferrelltl@ornl.gov>
Date: 3 Oct 1996 06:37:13 GMT
Organization: Oak Ridge National Lab
VIP Basic got high marks from MacWorld. FB II can be used for numerical
work if you know the tricks and is pretty good for oop. There was a
thorough review of FB posted here a few months ago. You should read the
MacWorld review of VIP to see if it suits you. True Basic is one of my
favorites,especially as the references are so excellent. For more
info,including info on the freeware Chipmunk Basic (interpreter), and
info on how to find the companies, see
<http://www.fys.ruu.nl/~bergmann/basic.html>
and don't overlook the "general" category,which lists offerings for Mac
as well as other platforms.
Thomas L. Ferrell, PhD
Health Sciences Research Division
Oak Ridge National Laboratory and
Dept. of Physics, University of Tennessee
+++++++++++++++++++++++++++
From jafederi@artsci.wustl.edu (John Federico)
Date: Wed, 02 Oct 1996 09:20:09 -0600
Organization: Washington University School of Law
I bought and used FutureBasic for awhile and was
> disappointed by the incredibly poor performance of floating point operations
> (this is scientific programming) and a large number of system corruptions I
> managed to produce.
>
Just as a side note, there was a thread on AOL's Ariel message board about
how to do fast math in FutureBasic. Also, I seem to recall a SANE library
of functions included with FutureBasic II. (regular FB uses BCD math).
-rico
+++++++++++++++++++++++++++
From oneel@arupa.gsfc.nasa.gov (Bruce O'Neel)
Date: Thu, 03 Oct 1996 07:28:26 -0400
Organization: NASA Goddard Space Flight Center -- Greenbelt, Maryland USA
In article <pecora-0210961011120001@pecora7600.nrl.navy.mil>,
pecora@zoltar.nrl.navy.mil (Louis M. Pecora) wrote:
> In article <cjones.1194596791A@news.colorado.edu>,
> cjones@mantle.colorado.edu (Craig Jones) wrote:
>
>
> Future Basic, I believe, uses BCD arithmetic (no FPU use) so it will be
> very slow for floating point.
>
> In the past I've used True Basic and liked it very much. It is easy to
> use, standard (written by the original BASIC inventors), and has quick and
> simple graphics. For good numerical performance (for a BASIC -- still
> slower than Fortan or C) and ease of use and setup, I highly recommend it.
>
> If you really want the best performance or you want to get into the
> nitty-gritty of Mac UI/API programming it may not be the best. I think
> there are some hooks into the system so you can do some toolbox stuff, but
> that's not True Basic's forte.
>
> Unfortunately, I don't have contact information for them here, but I bet a
> web search on "True Basic" would show something. Anyone else have contact
> info?
>
Hi,
After a bit of poking around (aren't the web and search engines great?
It saves me from having to do real work :-) True BASIC has a web site at
http://www.truebasic.com/. I know, a bit logical, but I didn't think of
it. There also looks like there is an interesting site at
http://www.kie.berkeley.edu/people/alex/work.html. This person (Alex
Cuthbert) is the Unix True BASIC maintainer. They look like they are moving
forward with new versions (True BASIC 5.0) and something called WebBasic
(think Basic applettes).
From the webpages the contact info is TRUE BASIC INC. - 12 COMMERCE AVENUE,
WEST LEBANON NH 03784-1669 Tel: 800 436 2111 Fax: 603 298 7015 Sales
Questions: sales@truebasic.com.
thanks!
bruce
+++++++++++++++++++++++++++
From Yves_Gendron@mouse.edmonton.ab.ca (Yves Gendron)
Date: 08 Oct 1996 10:17:08 GMT
Organization: MOUSE
Here is some of my own experience at floating-point computations involving
heavy trigonometric function use. I can only say the following.
Yes, FutureBasic is quite slow at floating-point computations because it uses
a Binary Coded Decimal scheme (BCD) rather than the SANE scheme for
floating-point computations. You can speed up your code by using SANE
(Standard Apple Numeric Environment) calls from within FutureBasic version 1
or 2. However these FutureBasic calls to SANE involve doing a lot of
conversion from 'extended' to 'BCD' number format, back and forth, and the
speed improvement in the overall computation (50 to 200%, or something like
that) depends heavily on how many math operations are involved for each
computation.
I converted a FutureBasic program to VIP-BASIC v1.03/1.05 to check its speed
for floating-point operations a long while ago. One problem was that the
VIP-BASIC code, being interpreted rather than compiled code, would run even
slower than the FutureBasic code for most floating-point math operations,
especially for the trigonometric functions. So not much gain there, though
VIP-BASIC code was more compatible with the old QuickBasic code.
Simply, for floating-point math operations, QuickBasic was hard to beat as
its math library was so good that it ran floating-point computations a fair
bit faster (even faster with an FPU) than THINK Pascal v4.02, and only about
15-20% slower than THINK C v5.04. That was what you would call a quick Basic
(no pun intended). Too bad Microsoft decided to quit supporting QuickBasic,
they had a good product for scientific applications.
If you really need the floating-point speed for your QuickBasic code I would
suggest converting the QuickBasic code to C, or easier , convert the code to
THINK Pascal. THINK Pascal is still being sold by Symantec, though I do not
know if they've ever updated their last version (4.02) of the THINK Pascal
software of a few years ago. However, they have a new Universal Header file
for THINK Pascal (as of the Fall of 95).
Just my $0.02 worth of comments on the topic,
YG
---------------------------
From chipperc@msgpop.cs.mci.com (Chip Cuntz)
Subject: WANTED: Simple FAT DA...
Date: 8 Oct 1996 00:53:13 GMT
Organization: The Fun House of Life
I need to do a simple DA or APPL that does stuff via a Modal Dialog...
Anyone have any examples of this that I can tweak? Can anybody point me
in the direction of such an example... I am out of the Mac world these
days in lieu of a UNIX job, but would love to put my CodeWarrior to
work!
Chip
Please reply via eMail...
+++++++++++++++++++++++++++
From blob@ricochet.net
Date: Tue, 08 Oct 1996 08:13:45 -0700
Organization: (none)
In article <chipperc-0710961853190001@ppp95.cs.mci.com>,
chipperc@msgpop.cs.mci.com (Chip Cuntz) wrote:
> I need to do a simple DA or APPL that does stuff via a Modal Dialog...
Don't write desk accessories. They are obsolete.
There are many examples in the sample code at <http://devworld.apple.com>.
Perhaps more details about what exactly you are trying to do (posted, not
sent just to me) would result in more detailed replies.
--
(Pointers to other Mac programming web sites at
<http://devworld.apple.com/dev/geeks.html>)
---------------------------
From vergnaud@via.ecp.fr (Guillaume Vergnaud)
Subject: WinSock.lib for macintosh
Date: 8 Oct 1996 10:12:34 GMT
Organization: Ecole Centrale Paris, France
Hi,
I have to port a window's client, which uses winsocks, onto the mac.
It would be very cool and much more simple if I had a winsock library
(or its sources) for the macintosh. I need an msql library, too.
Anyone knows about it ?
Thanx.
Guillaume.
+++++++++++++++++++++++++++
From "Michael Ferrador" <n2kra@orn.com>
Date: 9 Oct 1996 04:14:10 GMT
Organization: FerraSoft
Guillaume Vergnaud <vergnaud@via.ecp.fr> wrote in article
<53d9ei$8vo@piston.ecp.fr>...
> Hi,
>
> I have to port a window's client, which uses winsocks, onto the mac.
> It would be very cool and much more simple if I had a winsock library
> (or its sources) for the macintosh. I need an msql library, too.
> Anyone knows about it ?
>
I have MS Visual C++ 4.1, and was thinking about getting it for the
Macinosh.
Does anyone know if it has libraries to call MacTCP/OT?
+++++++++++++++++++++++++++
From parkec3@rpi.edu (Chris Parker)
Date: Wed, 09 Oct 1996 10:00:29 -0400
Organization: Rensselaer Polytechnic Institute, Troy NY, USA
In article <01bbb599$1861b1a0$6e00402c@mjf>, "Michael Ferrador"
<n2kra@orn.com> wrote:
> Guillaume Vergnaud <vergnaud@via.ecp.fr> wrote in article
> <53d9ei$8vo@piston.ecp.fr>...
<< Stuff from Guillaume deleted >>
> I have MS Visual C++ 4.1, and was thinking about getting it for the
> Macinosh.
> Does anyone know if it has libraries to call MacTCP/OT?
Remember, when you do that what you're getting is a cross-compiler (and I
haven't heard great things about it).
Hey, on a related note (i.e. Guillaume's earlier message in this thread) -
I too am looking for a winsock library for the Mac (preferably one that
does both MacTCP and OT - I don't ask for much :^)...
Any pointers?
- Chris
- -------------------------------------------------------------------
Check out the Design Conference Room Page! http://www.dcr.rpi.edu/
- -------------------------------------------------------------------
Chris Parker "If it wasn't hard, everyone would do it.
parkec3@rpi.edu The hard is what makes it great."
http://www.rpi.edu/~parkec3/ - Tom Hanks, _A_League_of_Their_Own_
+++++++++++++++++++++++++++
From jordanz@altura.com (Jordan Zimmerman)
Date: Tue, 08 Oct 1996 11:25:49 -0800
Organization: Altura Software, Inc.
In article <53d9ei$8vo@piston.ecp.fr>, vergnaud@via.ecp.fr (Guillaume
Vergnaud) wrote:
> Hi,
>
> I have to port a window's client, which uses winsocks, onto the mac.
> It would be very cool and much more simple if I had a winsock library
> (or its sources) for the macintosh. I need an msql library, too.
> Anyone knows about it ?
>
> Thanx.
>
> Guillaume.
NetManage has a WinSock implementation for the Mac that is very good
(http://www.netmanage.com). However, their implementation is currently
limited to 64 connections, but that should improve in the future.
--
Jordan Zimmerman
Altura Software, Inc.
home page: http://www.altura.com/jordanz
Harry Browne for President!
http://www.harrybrowne96.org 1 (800) 682 1776
Stop the Browne Out! Let Harry Browne debate! http://www.twr.com/STBO
---------------------------
From jordanz@altura.com (Jordan Zimmerman)
Subject: [Q] Internet Config help
Date: Wed, 02 Oct 1996 15:45:32 -0800
Organization: Altura Software, Inc.
Hello,
I'm currently using Internet Config to launch URLs from my app and it
works great.
Now, I have the need to open a text file in Netscape (or whatever browser
is the user's preference). Can I do this with Internet Config? I can't
figure out if I can from the docs. Basically, I have an FSSpec that I'd
like to pass to Internet Config and say "Hey, IC, open this with a WWW
Browser - Thanks!".
--
Jordan Zimmerman
Altura Software, Inc.
home page: http://www.altura.com/jordanz
Harry Browne for President!
http://www.harrybrowne96.org 1 (800) 682 1776
Stop the Browne Out! Let Harry Browne debate! http://www.twr.com/STBO
+++++++++++++++++++++++++++
From pmth02jc@umassd.edu (Jim Correia)
Date: Thu, 03 Oct 1996 23:18:54 -0500
Organization: University of Massachusetts Dartmouth
In article <jordanz-0210961545490001@204.147.232.52>, jordanz@altura.com
(Jordan Zimmerman) wrote:
>Hello,
>
>I'm currently using Internet Config to launch URLs from my app and it
>works great.
>
>Now, I have the need to open a text file in Netscape (or whatever browser
>is the user's preference). Can I do this with Internet Config? I can't
>figure out if I can from the docs. Basically, I have an FSSpec that I'd
>like to pass to Internet Config and say "Hey, IC, open this with a WWW
>Browser - Thanks!".
I only know of one way to do it, and it isn't pretty.
You can ask IC for the web helper. It will return an ICAppSpec (or
something of that sort) that contains a name and a creator code. You then
have to search all mounted drives for the app, launch it, and send it an
odoc with the fsspec.
I'd be interested to know if there is an easier way.
You may be able to convert the fsspec into a full path, then convert that
to a file:/// type url, then pass it to IC, but this route would require
that the user has set up file:/// url's to be routed to their browser,
which is very unlikely.
Good Luck,
Jim
--
Jim Correia
Software Developer
SimCalc Project <http://tango.mth.umassd.edu/>
pmth02jc@umassd.edu <http://tango.mth.umassd.edu/correia/>
+++++++++++++++++++++++++++
From Jordan Zimmerman <jordanz@altura.com>
Date: Fri, 04 Oct 1996 18:02:15 -0800
Organization: Altura Software, Inc.
> In article <jordanz-0210961545490001@204.147.232.52>, jordanz@altura.com
> (Jordan Zimmerman) wrote:
>
> >Hello,
> >
> >I'm currently using Internet Config to launch URLs from my app and it
> >works great.
> >
> >Now, I have the need to open a text file in Netscape (or whatever browser
> >is the user's preference). Can I do this with Internet Config? I can't
> >figure out if I can from the docs. Basically, I have an FSSpec that I'd
> >like to pass to Internet Config and say "Hey, IC, open this with a WWW
> >Browser - Thanks!".
>
> I only know of one way to do it, and it isn't pretty.
[snip]
I figured out how to do it. Indeed, I needed to generate a full path for
the file and then issue a LaunchURL with "file". However, that Helper
isn't normally set up in Internet Config, so I first check for the
presence of the "file" Helper preference, if I don't find it, I create
it using the http Helper preference.
I've distilled this into a code module that I can make available if
there's interest.
+++++++++++++++++++++++++++
From fpottier@pauillac.inria.fr (Francois Pottier)
Date: 7 Oct 1996 09:54:56 GMT
Organization: INRIA Rocquencourt, BP 105, 78153 Le Chesnay Cedex, France
In article <3255C198.5A51@altura.com>,
Jordan Zimmerman <jordanz@altura.com> wrote:
>I figured out how to do it.
Yup, that's exactly what I do too.
--
Francois Pottier
Francois.Pottier@inria.fr
http://pauillac.inria.fr/~fpottier/
---------------------------
From vferrera@ix.netcom.com
Subject: text rotation
Date: Fri, 20 Sep 1996 21:38:37 +0000
Organization: Netcom
Does anyone know an easy way to rotate text strings in Quickdraw? I
am plotting some scientific data and I want to rotate the y-axis
labels so that the text runs vertically rather than horizontally. It
seems like there should be an easy way to do this, but I can't find
any obvious functions in my copy of IM (which is many years out of
date). I am using Think C 5.0.4 and system 7.1, so you can see what a
dinosaur I am. Any help is appreciated. Even more so if you can
reply by email to: vpf3@columbia.edu. Thanks,
Vincent Ferrera
+++++++++++++++++++++++++++
From SouthSide@kagi.com (Bob Bradley)
Date: Fri, 20 Sep 1996 19:09:32 -0800
Organization: SPC
In article <32430EDD.373C@ix.netcom.com>, vferrera@ix.netcom.com wrote:
> Does anyone know an easy way to rotate text strings in Quickdraw? I
> am plotting some scientific data and I want to rotate the y-axis
> labels so that the text runs vertically rather than horizontally. It
> seems like there should be an easy way to do this, but I can't find
> any obvious functions in my copy of IM (which is many years out of
> date). I am using Think C 5.0.4 and system 7.1, so you can see what a
> dinosaur I am. Any help is appreciated. Even more so if you can
> reply by email to: vpf3@columbia.edu. Thanks,
If you can't rely on QuickDraw GX being installed and you don't mind being
forced to a fixed resolution (eg. 72 dpi) there's source on Apple's and
the alt.source.mac site for rotating a string into a Bitmap which you can
CopyBits to wherever you need it.
+++++++++++++++++++++++++++
From dowdy@apple.com (Tom Dowdy)
Date: Tue, 24 Sep 1996 08:21:58 -0700
Organization: Apple Computer, Inc.
In article <3247ADC2.4F93@sperling.com>, sperling@sperling.com wrote:
> Easy? Yes and no. It's very easy if your programming in FutureBasic,
> else it's not so easy. Unfortunately, Apple never built that sort of
> thing into a toolbox call. Too bad...
Actually, QuickDraw GX allows you to perform any 3X3 matrix operation on
any object (text included) so you can perform rotation with a toolbox
call.
It's pretty easy to use GX just for one chunk of your code and not others,
and to disable features of your app when it isn't there.
--
Tom Dowdy Internet: dowdy@apple.COM
Apple Computer MS:302-3KS UUCP: {sun,voder,amdahl,decwrl}!apple!dowdy
1 Infinite Loop AppleLink: DOWDY1
Cupertino, CA 95014
"The 'Ooh-Ah' Bird is so called because it lays square eggs."
+++++++++++++++++++++++++++
From carl.gustafson@no.spam.welcome (Carl Gustafson)
Date: Tue, 24 Sep 1996 12:29:42 -0400
Organization: Imaging and Computer Vision Center, Drexel University
In article <32430EDD.373C@ix.netcom.com>, vferrera@ix.netcom.com wrote:
> Does anyone know an easy way to rotate text strings in Quickdraw? I
> am plotting some scientific data and I want to rotate the y-axis
> labels so that the text runs vertically rather than horizontally. It
> seems like there should be an easy way to do this, but I can't find
> any obvious functions in my copy of IM (which is many years out of
> date). I am using Think C 5.0.4 and system 7.1, so you can see what a
> dinosaur I am. Any help is appreciated. Even more so if you can
> reply by email to: vpf3@columbia.edu. Thanks,
You can not rotate text directly in QuickDraw (You can in GX). To do
rotated text in POQD (plain old QuickDraw) you need to draw the text into
a buffer, then rotate the buffer (you thus have two buffers - one long,
the other tall), and copybits that buffer into your drawing.
Easiest way is to make two 8-bit deep buffers (GWorlds) based on your text
dimensions, draw to one, they move pixel-by-pixel into the other.
--
Carl Gustafson
carl.gustafson at ece.drexel.edu
(busily trying to avoid spammers)
Imaging and Computer Vision Center
Drexel University, Philadelphia, Penna
- ----------------------------------------------------------
I don't speak for Drexel, and Drexel doesn't listen to me...
+++++++++++++++++++++++++++
From "Tedd F. Sperling" <sperling@sperling.com>
Date: Tue, 24 Sep 1996 09:45:46 +0000
Organization: Sperling Corporation
vferrera@ix.netcom.com wrote:
>
> Does anyone know an easy way to rotate text strings in Quickdraw? I
> am plotting some scientific data and I want to rotate the y-axis
> labels so that the text runs vertically rather than horizontally. It
> seems like there should be an easy way to do this, but I can't find
> any obvious functions in my copy of IM (which is many years out of
> date). I am using Think C 5.0.4 and system 7.1, so you can see what a
> dinosaur I am. Any help is appreciated. Even more so if you can
> reply by email to: vpf3@columbia.edu. Thanks,
>
> Vincent Ferrera
Hi:
Easy? Yes and no. It's very easy if your programming in FutureBasic,
else it's not so easy. Unfortunately, Apple never built that sort of
thing into a toolbox call. Too bad...
For angles of 90 and 180 (left-to-right -> up-to-down and left-to-right
-> down-to-up), FutureBasic PGPro has a function for doing that very
fast.
The way to do it is to draw the string in Offscreen GWorlds and then
rotate the rectangle 90 degrees and bring it back via copybits.
tedd
--
____
|[ ]| mac programmer tedd f. sperling
|[__]| mailto: sperling@sperling.com
|___-| http://www.sojourn.com/~sperling/resume.html
- -
+++++++++++++++++++++++++++
From "Tedd F. Sperling" <sperling@sperling.com>
Date: Wed, 25 Sep 1996 08:51:57 +0000
Organization: Sperling Corporation
Tom Dowdy wrote:
>
> In article <3247ADC2.4F93@sperling.com>, sperling@sperling.com wrote:
> > Easy? Yes and no. It's very easy if your programming in FutureBasic,
> > else it's not so easy. Unfortunately, Apple never built that sort of
> > thing into a toolbox call. Too bad...
>
> Actually, QuickDraw GX allows you to perform any 3X3 matrix operation on
> any object (text included) so you can perform rotation with a toolbox
> call.
>
> It's pretty easy to use GX just for one chunk of your code and not others,
> and to disable features of your app when it isn't there.
>
> --
> Tom Dowdy Internet: dowdy@apple.COM
> Apple Computer MS:302-3KS UUCP: {sun,voder,amdahl,decwrl}!apple!dowdy
> 1 Infinite Loop AppleLink: DOWDY1
> Cupertino, CA 95014
> "The 'Ooh-Ah' Bird is so called because it lays square eggs."
Tom:
OK, what is the toolbox call to rotate text?
tedd
--
____
|[ ]| mac programmer tedd f. sperling
|[__]| mailto: sperling@sperling.com
|___-| http://www.sojourn.com/~sperling/resume.html
- -
+++++++++++++++++++++++++++
From dkj@apple.com (Dave Johnson)
Date: Wed, 25 Sep 1996 09:57:28 -0700
Organization: Apple Computer, Inc.
<snip>
> Tom:
>
> OK, what is the toolbox call to rotate text?
>
>
> tedd
I'm not Tom, but to rotate any GX shape, you can call
GXRotateShape( target, degrees, xOffset, yOffset );
where:
target A reference to the shape you want to rotate.
degrees The number of degrees to rotate the shape.
xOffset The horizontal coordinate of the origin to rotate the shape around.
yOffset The vertical coordinate of the origin to rotate the shape around.
there are several other ways to do it, too, but that's beyond the scope of
this answer :-)
- -
BTW, in the non-GX realm, there was a very cool algorithm to rotate a
bitmap or pixmap by 90 degrees presented years ago in MacTutor Vol. 1, No.
12 (and reprinted in "The Best of MacTutor, Vol. 1") by Robert B Denny. If
anyone's interested, I can post my own (pretty skanky) version of it. It's
much more elegant - and lots faster, I think - than a pixel-by-pixel
transformation.
Dave Johnson
dkj@aple.com
+++++++++++++++++++++++++++
From jasonp@red.seas.upenn.edu (Jason S Pareti)
Date: 25 Sep 1996 19:36:00 GMT
Organization: University of Pennsylvania
Dave Johnson (dkj@apple.com) wrote:
: If anyone's interested, I can post my own (pretty skanky) version of it.
: much more elegant - and lots faster, I think - than a pixel-by-pixel
: transformation.
Yeah, I'd be very interested in seeing it, if you don't mind. Thanks.
Cheers,
Jason
(someone who's software uses the old pixel-by-pixel method)
+++++++++++++++++++++++++++
From "Tedd F. Sperling" <sperling@sperling.com>
Date: Wed, 25 Sep 1996 23:04:36 +0000
Organization: Sperling Corporation
Dave Johnson wrote:
>
> <snip>
> > Tom:
> >
> > OK, what is the toolbox call to rotate text?
> >
> >
> > tedd
>
> I'm not Tom, but to rotate any GX shape, you can call
>
> GXRotateShape( target, degrees, xOffset, yOffset );
>
> where:
>
> target A reference to the shape you want to rotate.
> degrees The number of degrees to rotate the shape.
> xOffset The horizontal coordinate of the origin to rotate the shape around.
> yOffset The vertical coordinate of the origin to rotate the shape around.
>
> there are several other ways to do it, too, but that's beyond the scope of
> this answer :-)
>
> ---
> BTW, in the non-GX realm, there was a very cool algorithm to rotate a
> bitmap or pixmap by 90 degrees presented years ago in MacTutor Vol. 1, No.
> 12 (and reprinted in "The Best of MacTutor, Vol. 1") by Robert B Denny. If
> anyone's interested, I can post my own (pretty skanky) version of it. It's
> much more elegant - and lots faster, I think - than a pixel-by-pixel
> transformation.
>
> Dave Johnson
> dkj@aple.com
Dave:
Thanks, I'll try GXRotateShape().
tedd
--
____
|[ ]| mac programmer tedd f. sperling
|[__]| mailto: sperling@sperling.com
|___-| http://www.sojourn.com/~sperling/resume.html
- -
+++++++++++++++++++++++++++
From rcsmith@servtech.com (Roger Smith)
Date: Tue, 24 Sep 1996 21:21:55 -0500
Organization: Base Online
In article <3247ADC2.4F93@sperling.com>, sperling@sperling.com wrote:
> vferrera@ix.netcom.com wrote:
> >
> > Does anyone know an easy way to rotate text strings in Quickdraw? I
> > am plotting some scientific data and I want to rotate the y-axis
> > labels so that the text runs vertically rather than horizontally. It
> > seems like there should be an easy way to do this, but I can't find
> > any obvious functions in my copy of IM (which is many years out of
> > date). I am using Think C 5.0.4 and system 7.1, so you can see what a
> > dinosaur I am. Any help is appreciated. Even more so if you can
> > reply by email to: vpf3@columbia.edu. Thanks,
> >
> > Vincent Ferrera
Here is one option which may be overkill in your situation, grab a hold of
the Develop article 'curves ahead' (Curves in quickdraw). Using only
Quickdraw calls and true type fonts (i.e 'sfnt' resource) it shows how to
extract the outline information from a true type font. I went one step
further and modified the sample code to return a polyhandle representing
the text, then using a simple "rotate polygon x degrees" routine I could
rotate and draw a polygon outline (or you could call filly poly) of the
text in any position withouthaving to use gworlds or GX.
Roger Smith
+++++++++++++++++++++++++++
From dkj@apple.com (Dave Johnson)
Date: Fri, 27 Sep 1996 11:05:54 -0700
Organization: Apple Computer, Inc.
In article <52c1j0$gpq@netnews.upenn.edu>, jasonp@red.seas.upenn.edu
(Jason S Pareti) wrote:
> Dave Johnson (dkj@apple.com) wrote:
>
> : If anyone's interested, I can post my own (pretty skanky) version of it.
> : much more elegant - and lots faster, I think - than a pixel-by-pixel
> : transformation.
>
> Yeah, I'd be very interested in seeing it, if you don't mind. Thanks.
>
> Cheers,
> Jason
> (someone who's software uses the old pixel-by-pixel method)
The original article is at:
http://web.xplain.com/mactech.com/Articles/Vol.01/01.12/PICT-Rotation/text.html
and includes some sample code in the article, but it was wrtitten in 1985
so I don't know if it will still work.
I confess I don't have the slightest idea how to post binaries, so posting
my code isn't possible at the moment. Now that I've exposed my ignorance,
anyone want to enlighten me? Email, please...
I'll see if I can get it on a publick ftp site, too.
Dave Johnson
dkj@apple.com
+++++++++++++++++++++++++++
From rogpatrick@aol.com (RogPatrick)
Date: 6 Oct 1996 17:46:15 -0400
Organization: America Online, Inc. (1-800-827-6364)
If you use Quickdraw GX to rotate text, does it preserve
its identity as text or will it appear bit-mapped when
printed or saved to a PICT file???
If the answer is no (or even if it's yes) does anyone know
a method for getting around this? Seems like programs
such as Cricket Graph or MacDraw have been doing this
for years?
+++++++++++++++++++++++++++
From "Tedd F. Sperling" <sperling@sperling.com>
Date: Sun, 06 Oct 1996 20:14:33 +0000
Organization: Sperling Corporation
RogPatrick wrote:
>
> If you use Quickdraw GX to rotate text, does it preserve
> its identity as text or will it appear bit-mapped when
> printed or saved to a PICT file???
> If the answer is no (or even if it's yes) does anyone know
> a method for getting around this? Seems like programs
> such as Cricket Graph or MacDraw have been doing this
> for years?
Well... I haven't used QuickDraw GX to rotate text, so I can't speak for
what it does or does not do. However, I have written a text rotation
routine that draws the text in offscreen GWorld; then rotates a rect
surrounding the text; and then brings it forward via copybits. I assume
that GXRotate does something similar.
As such, you don't get high quality laser text when dumping it to a
printer. I instead use an alternate routine for printing rotated text to
the printer using PicComment (i.e., send the printer postscript
commands). It works fine for postscript printers, but non-postscript is
still bit-mapped.
Hope this helps.
tedd
--
____
|[ ]| mac programmer tedd f. sperling
|[__]| mailto: sperling@sperling.com
|___-| http://www.sojourn.com/~sperling/resume.html
- -
+++++++++++++++++++++++++++
From SouthSide@kagi.com (Bob Bradley)
Date: Sun, 06 Oct 1996 23:05:49 -0800
Organization: SPC
In article <32581326.7E20@sperling.com>, sperling@sperling.com wrote:
> Well... I haven't used QuickDraw GX to rotate text, so I can't speak for
> what it does or does not do. However, I have written a text rotation
> routine that draws the text in offscreen GWorld; then rotates a rect
> surrounding the text; and then brings it forward via copybits. I assume
> that GXRotate does something similar.
No, QuickDraw GX rotates the actual text shape as opposed to the bitmap
representation of the text so it doesn't lose quality. It will print just
as good rotated.
+++++++++++++++++++++++++++
From "Tedd F. Sperling" <sperling@sperling.com>
Date: Mon, 07 Oct 1996 09:42:20 +0000
Organization: Sperling Corporation
Bob Bradley wrote:
>
> In article <32581326.7E20@sperling.com>, sperling@sperling.com wrote:
>
> > Well... I haven't used QuickDraw GX to rotate text, so I can't speak for
> > what it does or does not do. However, I have written a text rotation
> > routine that draws the text in offscreen GWorld; then rotates a rect
> > surrounding the text; and then brings it forward via copybits. I assume
> > that GXRotate does something similar.
>
> No, QuickDraw GX rotates the actual text shape as opposed to the bitmap
> representation of the text so it doesn't lose quality. It will print just
> as good rotated.
Wow!
I'm impressed.
tedd
--
____
|[ ]| mac programmer tedd f. sperling
|[__]| mailto: sperling@sperling.com
|___-| http://www.sojourn.com/~sperling/resume.html
- -
---------------------------
End of C.S.M.P. Digest
**********************